mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Fix all the errors to get our tests green on Rails 5.1.
This commit is contained in:
parent
898ee93547
commit
77d4c4d8dc
989 changed files with 5114 additions and 3117 deletions
|
@ -5,7 +5,7 @@ describe ComposerMessagesController do
|
|||
context '.index' do
|
||||
|
||||
it 'requires you to be logged in' do
|
||||
expect { xhr :get, :index }.to raise_error(Discourse::NotLoggedIn)
|
||||
expect { get :index, format: :json }.to raise_error(Discourse::NotLoggedIn)
|
||||
end
|
||||
|
||||
context 'when logged in' do
|
||||
|
@ -13,7 +13,7 @@ describe ComposerMessagesController do
|
|||
let(:args) { { 'topic_id' => '123', 'post_id' => '333', 'composer_action' => 'reply' } }
|
||||
|
||||
it 'redirects to your user preferences' do
|
||||
xhr :get, :index
|
||||
get :index, format: :json
|
||||
expect(response).to be_success
|
||||
end
|
||||
|
||||
|
@ -21,7 +21,7 @@ describe ComposerMessagesController do
|
|||
finder = mock
|
||||
ComposerMessagesFinder.expects(:new).with(instance_of(User), has_entries(args)).returns(finder)
|
||||
finder.expects(:find)
|
||||
xhr :get, :index, args
|
||||
get :index, params: args, format: :json
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue