Skip to content

Commit

Permalink
Expect page_version save to change page updated_at
Browse files Browse the repository at this point in the history
Instead of expecting that rails calls a method on the receiver
we expect that the updated_at time has changed.
  • Loading branch information
tvdeyen committed Sep 12, 2021
1 parent 7fb8932 commit 0e234f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions spec/models/alchemy/page_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
let(:page) { page_version.page }

it "touches the page" do
expect(page).to receive(:touch)
page_version.save
expect { page_version.save }.to change(page, :updated_at)
end
end

Expand Down

0 comments on commit 0e234f7

Please sign in to comment.