Sha256: b2bf212d9c2b6a69e6b2c46a90ce75e2de08f147e020cf1292665c306dd9a337

Contents?: true

Size: 808 Bytes

Versions: 2

Compression:

Stored size: 808 Bytes

Contents

describe 'Table', ->
  describe '#getCommands', ->
    describe 'if table was created', ->
      it 'should be a kind of CreateTableCommand', ->
        table = new Ponytail.Models.Table({isCreated: true})
        command = table.getCommands()[0]
        expect(command).toEqual(jasmine.any(Ponytail.Models.CreateTableCommand))

    describe 'if table was dropped', ->
      it 'should be a kind of DropTableCommand', ->
        table = new Ponytail.Models.Table({isDrop: true})
        command = table.getCommands()[0]
        expect(command).toEqual(jasmine.any(Ponytail.Models.DropTableCommand))

    describe 'if table was created, and was dropped', ->
      it 'should be []', ->
        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.6.0 spec/javascripts/ponytail/models/table_spec.coffee
ponytail-0.5.0 spec/javascripts/ponytail/models/table_spec.coffee