Skip to content

Commit

Permalink
Rely on what happens, not what changes.
Browse files Browse the repository at this point in the history
This solves CI which can be way too fast for there to be an updated timestamp
  • Loading branch information
parndt committed Jan 12, 2017
1 parent c1adbc8 commit d4d4a86
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pages/spec/models/refinery/page_part_spec.rb
Expand Up @@ -33,10 +33,8 @@ module Refinery

it 'updates the page updated_at field when changed' do
page.save

expect {
page.parts.first.update_attribute(:content, 'Modified')
}.to change { page.reload.updated_at }.from(page.updated_at)
expect(page).to receive(:touch)
page.parts.first.update_attribute(:content, 'Modified')
end

context 'when using content_for?' do
Expand Down

0 comments on commit d4d4a86

Please sign in to comment.