Sha256: 285dbab4adb1bacc665fa7d7a32b7a5c7d410cc41a06e8c48510752b33fbac07
Contents?: true
Size: 467 Bytes
Versions: 18
Compression:
Stored size: 467 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'a secure Grape API' do subject(:api_call) { safe_get '/api/secure_resource' } context 'with an authenticated user', :auth_request do it 'should be successful' do api_call expect(response.status).to eq(200) end end context 'without an authenticated user' do it 'should be unauthorized' do api_call expect(response.status).to eq(401) end end end
Version data entries
18 entries across 18 versions & 1 rubygems