FIX: Incorrect error raised.

This commit is contained in:
Guo Xiang Tan
2017-04-25 09:56:26 +08:00
parent 644c15926a
commit 6f7c6b0fd0
2 changed files with 5 additions and 3 deletions

View File

@ -36,8 +36,10 @@ describe NotificationsController do
context 'when username params is not valid' do
it 'should raise the right error' do
expect { xhr :get, :index, username: 'somedude' }
.to raise_error(Discourse::InvalidParameters)
xhr :get, :index, username: 'somedude'
expect(response).to_not be_success
expect(response.status).to eq(404)
end
end
end