Sha256: 9d3024e853383a2a17187d842bfe9a87bd2f42d9964d0869ec2f6c4b7d5dde7b

Contents?: true

Size: 995 Bytes

Versions: 14

Compression:

Stored size: 995 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Github::Orgs::Members, '#conceal' do
  let(:org)    { 'github' }
  let(:user) { 'peter-murach' }
  let(:request_path) { "/orgs/#{org}/public_members/#{user}" }

  before {
    stub_delete(request_path).to_return(:body => body, :status => status,
      :headers => {:content_type => "application/json; charset=utf-8"})
  }

  after { reset_authentication_for(subject) }

  context "request perfomed successfully" do
    let(:body) { fixture('orgs/members.json') }
    let(:status) { 204 }

    it "should fail to get resource without org name" do
      expect { subject.conceal }.to raise_error(ArgumentError)
    end

    it { expect { subject.conceal org }.to raise_error(ArgumentError) }

    it "should get the resources" do
      subject.conceal org, user
      a_delete(request_path).should have_been_made
    end
  end

  it_should_behave_like 'request failure' do
    let(:requestable) { subject.conceal org, user }
  end

end # conceal

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
github_api-0.11.3 spec/github/orgs/members/conceal_spec.rb
github_api-0.11.2 spec/github/orgs/members/conceal_spec.rb
github_api-0.11.1 spec/github/orgs/members/conceal_spec.rb
github_api-0.11.0 spec/github/orgs/members/conceal_spec.rb
github_api-0.10.2 spec/github/orgs/members/conceal_spec.rb
github_api-0.10.1 spec/github/orgs/members/conceal_spec.rb
github_api-0.10.0 spec/github/orgs/members/conceal_spec.rb
github_api-0.9.7 spec/github/orgs/members/conceal_spec.rb
github_api-0.9.6 spec/github/orgs/members/conceal_spec.rb
github_api-0.9.5 spec/github/orgs/members/conceal_spec.rb
github_api-0.9.4 spec/github/orgs/members/conceal_spec.rb
github_api-0.9.3 spec/github/orgs/members/conceal_spec.rb
github_api-0.9.2 spec/github/orgs/members/conceal_spec.rb
github_api-0.9.1 spec/github/orgs/members/conceal_spec.rb