Sha256: 2db1cb9668f85e2eeeb79b9d6a7f59d4f0c3073dd22334995e951f1e6b9f0715

Contents?: true

Size: 673 Bytes

Versions: 24

Compression:

Stored size: 673 Bytes

Contents

require 'spec_helper'

describe Volt::Models::Helpers::Model do
  describe "saved_state" do
    it 'should start not_saved for a buffer' do
      item = the_page._items.buffer
      expect(item.saved_state).to eq(:not_saved)
    end

    it 'should move to saved when the buffer is saved' do
      item = the_page._items.buffer
      item.save!.then do
        expect(item.saved_state).to eq(:saved)
      end
    end

    it 'should start as saved after create' do
      item = the_page._items.create({name: 'One'})

      expect(item.saved_state).to eq(:saved)
    end

    # TODO: because server side model loading is done synchronusly, we can't
    # test the
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
volt-0.9.7.pre8 spec/models/helpers/model_spec.rb
volt-0.9.7.pre7 spec/models/helpers/model_spec.rb
volt-0.9.7.pre6 spec/models/helpers/model_spec.rb
volt-0.9.7.pre5 spec/models/helpers/model_spec.rb
volt-0.9.7.pre3 spec/models/helpers/model_spec.rb
volt-0.9.7.pre2 spec/models/helpers/model_spec.rb
volt-0.9.6 spec/models/helpers/model_spec.rb
volt-0.9.6.pre3 spec/models/helpers/model_spec.rb
volt-0.9.6.pre2 spec/models/helpers/model_spec.rb
volt-0.9.6.pre1 spec/models/helpers/model_spec.rb
volt-0.9.5 spec/models/helpers/model_spec.rb
volt-0.9.5.pre12 spec/models/helpers/model_spec.rb
volt-0.9.5.pre11 spec/models/helpers/model_spec.rb
volt-0.9.5.pre9 spec/models/helpers/model_spec.rb
volt-0.9.5.pre8 spec/models/helpers/model_spec.rb
volt-0.9.5.pre7 spec/models/helpers/model_spec.rb
volt-0.9.5.pre6 spec/models/helpers/model_spec.rb
volt-0.9.5.pre5 spec/models/helpers/model_spec.rb
volt-0.9.5.pre4 spec/models/helpers/model_spec.rb
volt-0.9.5.pre3 spec/models/helpers/model_spec.rb