The code powering m.abunchtell.com https://m.abunchtell.com
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

27 wiersze
654 B

  1. require 'rails_helper'
  2. RSpec.describe Api::V1::AppsController, type: :controller do
  3. render_views
  4. describe 'POST #create' do
  5. before do
  6. post :create, params: { client_name: 'Test app', redirect_uris: 'urn:ietf:wg:oauth:2.0:oob' }
  7. end
  8. it 'returns http success' do
  9. expect(response).to have_http_status(200)
  10. end
  11. it 'creates an OAuth app' do
  12. expect(Doorkeeper::Application.find_by(name: 'Test app')).to_not be nil
  13. end
  14. it 'returns client ID and client secret' do
  15. json = body_as_json
  16. expect(json[:client_id]).to_not be_blank
  17. expect(json[:client_secret]).to_not be_blank
  18. end
  19. end
  20. end