Check response body instead of assigns in authorize interactions controller spec

This commit is contained in:
Matt Jankowski 2024-04-30 13:00:44 -04:00
parent f18341bd89
commit c9d08bafe5
1 changed files with 6 additions and 4 deletions

View File

@ -46,8 +46,9 @@ describe AuthorizeInteractionsController do
get :show, params: { acct: 'http://example.com' }
expect(response).to have_http_status(302)
expect(assigns(:resource)).to eq account
expect(response)
.to have_http_status(302)
.and redirect_to(web_url("@#{account.pretty_acct}"))
end
it 'sets resource from acct uri' do
@ -58,8 +59,9 @@ describe AuthorizeInteractionsController do
get :show, params: { acct: 'acct:found@hostname' }
expect(response).to have_http_status(302)
expect(assigns(:resource)).to eq account
expect(response)
.to have_http_status(302)
.and redirect_to(web_url("@#{account.pretty_acct}"))
end
end
end