var assert = require('assert');

describe('show', function () {

    beforeEach(function (done) {
        var scenario = this;
        process.chdir(scenario.projectDir);
        done();
    });
    afterEach(function (done) {
        var scenario = this;
        process.chdir(scenario.here);
        done();
    });

    it('Show all data.', function (done) {
        var scenario = this,
            commands = scenario.commands;
        commands.show({}, function (err) {
            assert.ifError(err);
            done();
        });
    });

    it('Show data of tasks.', function (done) {
        var scenario = this,
            commands = scenario.commands;
        commands.show({namespace: 'tasks'}, function (err) {
            assert.ifError(err);
            done();
        });
    });

    it('Show keys only.', function (done) {
        var scenario = this,
            commands = scenario.commands;
        var options = {};
        options["keys-only"] = true;
        commands.show(options, function (err) {
            assert.ifError(err);
            done();
        });
    });
});