Sha256: d0fbee93f3e8daee12080d6460c7f8efb663a6d4eeebdac0995b104761823ed4
Contents?: true
Size: 572 Bytes
Versions: 9
Compression:
Stored size: 572 Bytes
Contents
module JsonApiController shared_examples 'an app IDM endpoint' do subject { get :index } context 'without authentication' do it { is_expected.to have_http_status(:unauthorized), "response.code: #{response.code}" } end context 'with authentication' do let(:config) { Maestrano.configs.values.first } before { @request.env['HTTP_AUTHORIZATION'] = 'Basic ' + Base64.encode64("#{config.param('api.id')}:#{config.param('api.key')}") } it { is_expected.to have_http_status(:ok), "response.code: #{response.code}" } end end end
Version data entries
9 entries across 9 versions & 1 rubygems