Add spec for unauthorized access

pull/4950/head
Oliver Günther 8 years ago
parent 4658e83dd5
commit fe2295a605
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 10
      spec/requests/api/v3/user/create_user_resource_spec.rb

@ -194,4 +194,14 @@ describe ::API::V3::Users::UsersAPI do
.to include 'Status is not a valid status for new users.'
end
end
describe 'unauthorized user' do
let(:user) { FactoryGirl.build(:user) }
let(:parameters) { { status: 'invited', email: 'foo@example.org' } }
it 'returns an erroneous response' do
send_request
expect(response.status).to eq(403)
end
end
end

Loading…
Cancel
Save