mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
correct for earlier versions of ruby
This commit is contained in:
parent
7acdbc8448
commit
e947c3b9ec
1 changed files with 3 additions and 1 deletions
|
@ -22,10 +22,12 @@ describe PostOwnerChanger do
|
|||
it "changes the user" do
|
||||
bumped_at = topic.bumped_at
|
||||
|
||||
freeze_time 2.days.from_now
|
||||
|
||||
old_user = p1.user
|
||||
PostOwnerChanger.new(post_ids: [p1.id], topic_id: topic.id, new_owner: user_a, acting_user: editor).change_owner!
|
||||
p1.reload
|
||||
expect(p1.topic.bumped_at).to eq(bumped_at)
|
||||
expect(p1.topic.bumped_at).to be_within(1.second).of (bumped_at)
|
||||
expect(p1.topic.last_post_user_id).to eq(user_a.id)
|
||||
expect(old_user).not_to eq(p1.user)
|
||||
expect(p1.user).to eq(user_a)
|
||||
|
|
Loading…
Reference in a new issue