mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
fix some rspec deprecations
This commit is contained in:
parent
13e5c02643
commit
7d8dd9d93b
2 changed files with 3 additions and 3 deletions
|
@ -51,9 +51,9 @@ describe PostRevisor do
|
||||||
it 'allows the user to change it to a wiki' do
|
it 'allows the user to change it to a wiki' do
|
||||||
pc = PostCreator.new(newuser, topic_id: topic.id, raw: 'this is a post that will become a wiki')
|
pc = PostCreator.new(newuser, topic_id: topic.id, raw: 'this is a post that will become a wiki')
|
||||||
post = pc.create
|
post = pc.create
|
||||||
post.revise(post.user, wiki: true).should == true
|
post.revise(post.user, wiki: true).should be_truthy
|
||||||
post.reload
|
post.reload
|
||||||
post.wiki.should be_true
|
post.wiki.should be_truthy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -672,7 +672,7 @@ describe UsersController do
|
||||||
user.reload.username.should == new_username
|
user.reload.username.should == new_username
|
||||||
end
|
end
|
||||||
|
|
||||||
pending 'should fail if the user is old', 'ensure_can_edit_username! is not throwing' do
|
skip 'should fail if the user is old', 'ensure_can_edit_username! is not throwing' do
|
||||||
# Older than the change period and >1 post
|
# Older than the change period and >1 post
|
||||||
user.created_at = Time.now - (SiteSetting.username_change_period + 1).days
|
user.created_at = Time.now - (SiteSetting.username_change_period + 1).days
|
||||||
user.stubs(:post_count).returns(200)
|
user.stubs(:post_count).returns(200)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue