Sha256: 2521c32fdeb78da0740ba68545bf5afa6d7804a0000943ffad488a811b2a207c
Contents?: true
Size: 886 Bytes
Versions: 24
Compression:
Stored size: 886 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Github::Scopes, '#list' do let(:request_path) { "/user" } let(:body) { '[]' } let(:status) { 200 } let(:accepted_scopes) { "delete_repo, repo, public_repo, repo:status" } let(:scopes) { 'repo' } before { subject.oauth_token = OAUTH_TOKEN stub_get(request_path). with(:query => { :access_token => "#{OAUTH_TOKEN}"}). to_return(:body => body, :status => status, :headers => {:content_type => "application/json; charset=utf-8", 'x-accepted-oauth-scopes' => accepted_scopes, 'x-oauth-scopes' => 'repo' }) } after { reset_authentication_for(subject) } it 'performs request' do subject.list a_get(request_path).with(:query => {:access_token => OAUTH_TOKEN}). should have_been_made end it 'queries oauth header' do subject.list.should == [scopes] end end # list
Version data entries
24 entries across 24 versions & 1 rubygems