mirror of https://github.com/mastodon/mastodon
Check response body instead of assigns in authorize interactions controller spec
This commit is contained in:
parent
f18341bd89
commit
c9d08bafe5
|
@ -46,8 +46,9 @@ describe AuthorizeInteractionsController do
|
||||||
|
|
||||||
get :show, params: { acct: 'http://example.com' }
|
get :show, params: { acct: 'http://example.com' }
|
||||||
|
|
||||||
expect(response).to have_http_status(302)
|
expect(response)
|
||||||
expect(assigns(:resource)).to eq account
|
.to have_http_status(302)
|
||||||
|
.and redirect_to(web_url("@#{account.pretty_acct}"))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets resource from acct uri' do
|
it 'sets resource from acct uri' do
|
||||||
|
@ -58,8 +59,9 @@ describe AuthorizeInteractionsController do
|
||||||
|
|
||||||
get :show, params: { acct: 'acct:found@hostname' }
|
get :show, params: { acct: 'acct:found@hostname' }
|
||||||
|
|
||||||
expect(response).to have_http_status(302)
|
expect(response)
|
||||||
expect(assigns(:resource)).to eq account
|
.to have_http_status(302)
|
||||||
|
.and redirect_to(web_url("@#{account.pretty_acct}"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue