Sha256: 7c22bf0896c352c94a432d8b8363a07d63a84039c7a2115f863d174b21685767

Contents?: true

Size: 423 Bytes

Versions: 12

Compression:

Stored size: 423 Bytes

Contents

require 'spec_helper'

describe ::Trax::Model::Freezable do
  subject{ ::Message.create(:title => "Whatever") }

  its(:status) { should eq "queued" }

  context "in frozen state" do
    subject { ::Message.create(:title => "Whatever", :status => :delivered) }

    it do
      subject.title = "somethingelse"
      subject.save

      subject.errors.messages[:title].should include("Cannot be modified")
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trax_model-0.0.93 spec/trax/model/freezable_spec.rb
trax_model-0.0.92 spec/trax/model/freezable_spec.rb
trax_model-0.0.91 spec/trax/model/freezable_spec.rb
trax_model-0.0.9 spec/trax/model/freezable_spec.rb
trax_model-0.0.8 spec/trax/model/freezable_spec.rb
trax_model-0.0.7 spec/trax/model/freezable_spec.rb
trax_model-0.0.6 spec/trax/model/freezable_spec.rb
trax_model-0.0.5 spec/trax/model/freezable_spec.rb
trax_model-0.0.4 spec/trax/model/freezable_spec.rb
trax_model-0.0.3 spec/trax/model/freezable_spec.rb
trax_model-0.0.2 spec/trax/model/freezable_spec.rb
trax_model-0.0.1 spec/trax/model/freezable_spec.rb