fix most deprecations in the specs (still some left)

This commit is contained in:
Régis Hanol
2014-09-25 17:44:48 +02:00
parent dd5872eecb
commit de76b512c1
121 changed files with 859 additions and 856 deletions

View File

@ -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)