mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Add subject to test
Added subject to test because it seems that without a re-declaration of subject, the response will be nil As of now, the response is 422. Not sure why.
This commit is contained in:
parent
9fc4ed4027
commit
d36c2f27f3
@ -164,10 +164,16 @@ RSpec.describe '/api/v1/accounts' do
|
||||
end
|
||||
|
||||
context 'when user tries to follow their own account' do
|
||||
subject do
|
||||
post "/api/v1/accounts/#{other_account.id}/follow", headers: headers
|
||||
end
|
||||
|
||||
let(:locked) { false }
|
||||
let(:other_account) { user.account }
|
||||
|
||||
it 'returns http forbidden and error message' do
|
||||
subject
|
||||
|
||||
error_msg = 'Following your own account is not allowed'
|
||||
|
||||
expect(response).to have_http_status(403)
|
||||
|
Loading…
Reference in New Issue
Block a user