GeekPark/gpk_account

View on GitHub
spec/requests/api_authorizes_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'rails_helper'

RSpec.describe 'ApiAuthorizes', type: :request do
  describe 'doorkeeper_authorize' do
    it 'return 401 when token is wrong' do
      get api_v1_user_path
      expect(response.status).to eq(401)
      expect(JSON.parse(response.body)).to eq('error' => 'Invalid token')
    end
  end
end