Sha256: f5bde3b15898b581c63b302c8c78b90a74e8ad1e177f8bd68ced6d11408a94d4

Contents?: true

Size: 980 Bytes

Versions: 2

Compression:

Stored size: 980 Bytes

Contents

describe("Table", function() {
  describe("#getCommands", function() {
    describe("if table was created", function() {
      it("should be a kind of CreateTableCommand ", function() {
        var table = new Ponytail.Models.Table({isCreated: true});
        var command = table.getCommands()[0];
        expect(command).toEqual(jasmine.any(Ponytail.Models.CreateTableCommand));
      });
    });
    describe("if table was dropped", function() {
      it("should be a kind of DropTableCommand ", function() {
        var table = new Ponytail.Models.Table({isDrop: true});
        var command = table.getCommands()[0];
        expect(command).toEqual(jasmine.any(Ponytail.Models.DropTableCommand));
      });
    });
    describe("if table was created, and was dropped", function() {
      it("should be []", function() {
        var table = new Ponytail.Models.Table({isCreated: true, isDrop: true});
        expect(table.getCommands()).toEqual([]);
      });
    });
  });
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ponytail-0.4.0 spec/javascripts/ponytail/models/table_spec.js
ponytail-0.3.0 spec/javascripts/ponytail/models/table_spec.js