Sha256: e92bf4cd5cf19563f331d4efb69d997b763a0a06ced4d55a565fbd51cddcfaf8

Contents?: true

Size: 444 Bytes

Versions: 7

Compression:

Stored size: 444 Bytes

Contents

# -*- encoding : utf-8 -*-

describe Card::Action do
  describe "#delete_old_actions" do
    it "puts all changes on one action" do
      a = Card["A"]
      a.update_attributes!(name: "New A")
      a.update_attributes!(content: "New content")
      a.clear_history
      expect(a.actions.count).to eq(1)
      expect(a.actions.last.card_changes.count).to eq(0)
      expect(a.actions.reload.last.value :name).to eq("New A")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
card-1.93.3 spec/lib/card/action_spec.rb
card-1.93.2 spec/lib/card/action_spec.rb
card-1.93.1 spec/lib/card/action_spec.rb
card-1.93.0 spec/lib/card/action_spec.rb
card-1.92.2 spec/lib/card/action_spec.rb
card-1.92.1 spec/lib/card/action_spec.rb
card-1.92 spec/lib/card/action_spec.rb