mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 08:27:17 +08:00
fix most deprecations in the specs (still some left)
This commit is contained in:
@ -62,21 +62,21 @@ describe TopicUser do
|
||||
topic.notify_watch!(user)
|
||||
topic_user.notification_level.should == TopicUser.notification_levels[:watching]
|
||||
topic_user.notifications_reason_id.should == TopicUser.notification_reasons[:user_changed]
|
||||
topic_user.notifications_changed_at.should_not be_nil
|
||||
topic_user.notifications_changed_at.should_not == nil
|
||||
end
|
||||
|
||||
it 'should have the correct reason for a user change when set to regular' do
|
||||
topic.notify_regular!(user)
|
||||
topic_user.notification_level.should == TopicUser.notification_levels[:regular]
|
||||
topic_user.notifications_reason_id.should == TopicUser.notification_reasons[:user_changed]
|
||||
topic_user.notifications_changed_at.should_not be_nil
|
||||
topic_user.notifications_changed_at.should_not == nil
|
||||
end
|
||||
|
||||
it 'should have the correct reason for a user change when set to regular' do
|
||||
topic.notify_muted!(user)
|
||||
topic_user.notification_level.should == TopicUser.notification_levels[:muted]
|
||||
topic_user.notifications_reason_id.should == TopicUser.notification_reasons[:user_changed]
|
||||
topic_user.notifications_changed_at.should_not be_nil
|
||||
topic_user.notifications_changed_at.should_not == nil
|
||||
end
|
||||
|
||||
it 'should watch topics a user created' do
|
||||
@ -233,7 +233,7 @@ describe TopicUser do
|
||||
end
|
||||
|
||||
it 'has a key in the lookup for this forum topic' do
|
||||
TopicUser.lookup_for(user, [topic]).has_key?(topic.id).should be_true
|
||||
TopicUser.lookup_for(user, [topic]).has_key?(topic.id).should == true
|
||||
end
|
||||
|
||||
end
|
||||
@ -283,7 +283,7 @@ describe TopicUser do
|
||||
|
||||
# mails nothing to random users
|
||||
tu = TopicUser.find_by(user_id: user1.id, topic_id: post.topic_id)
|
||||
tu.should be_nil
|
||||
tu.should == nil
|
||||
|
||||
# mails other user
|
||||
tu = TopicUser.find_by(user_id: user2.id, topic_id: post.topic_id)
|
||||
|
Reference in New Issue
Block a user