identity_proofs_spec.rb 720 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe 'Accounts Identity Proofs API' do
  4. let(:user) { Fabricate(:user) }
  5. let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
  6. let(:scopes) { 'read:accounts' }
  7. let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
  8. let(:account) { Fabricate(:account) }
  9. describe 'GET /api/v1/accounts/identity_proofs' do
  10. it 'returns http success' do
  11. get "/api/v1/accounts/#{account.id}/identity_proofs", params: { limit: 2 }, headers: headers
  12. expect(response).to have_http_status(200)
  13. expect(response.content_type)
  14. .to start_with('application/json')
  15. end
  16. end
  17. end