Sha256: ffaac57ecfb1bb28bd4b0969c1c90f45fbfd5dcc2654fe11e482e086ef6737e3

Contents?: true

Size: 929 Bytes

Versions: 3

Compression:

Stored size: 929 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Collaborators do
  let(:format) { {'format' => 'table'} }
  let(:owner)  { 'peter-murach' }
  let(:repo)   { 'github_cli' }
  let(:user)   { 'github' }
  let(:api_class) { GithubCLI::Collaborator }

  it "invokes collab:list" do
    api_class.should_receive(:all).with(owner, repo, {}, format)
    subject.invoke "collab:list", [owner, repo]
  end

  it "invokes collab:add" do
    api_class.should_receive(:add).with(owner, repo, user, {}, format)
    subject.invoke "collab:add", [owner, repo, user]
  end

  it "invokes collab:collab" do
    api_class.should_receive(:collaborator?).with(owner, repo, user, {}, format)
    subject.invoke "collab:collab", [owner, repo, user]
  end

  it "invokes collab:collab" do
    api_class.should_receive(:remove).with(owner, repo, user, {}, format)
    subject.invoke "collab:remove", [owner, repo, user]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
github_cli-0.6.2 spec/github_cli/commands/collaborators_spec.rb
github_cli-0.6.1 spec/github_cli/commands/collaborators_spec.rb
github_cli-0.6.0 spec/github_cli/commands/collaborators_spec.rb