Sha256: 824b7829895621dadf24bfcff1b6cd5dfe72cc6b66418a7d8720571e529abff4

Contents?: true

Size: 932 Bytes

Versions: 3

Compression:

Stored size: 932 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Statuses do
  let(:format) { {'format' => 'table'} }
  let(:user)   { 'peter-murach' }
  let(:repo)   { 'github_cli' }
  let(:sha)    { '7f86c1b73255d4409348d68eb75f7cbbc2aa5c74' }
  let(:api_class) { GithubCLI::Status }

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

  it "invokes status:create" do
    api_class.should_receive(:create).with(user, repo, sha, {}, format)
    subject.invoke "status:create", [user, repo, sha]
  end

  it "invokes status:create --state --target" do
    api_class.should_receive(:create).with(user, repo, sha,
      {'state' => 'pending', 'target_url' => 'http://ci.example.com'}, format)
    subject.invoke "status:create", [user, repo, sha], :state => 'pending',
      :target => "http://ci.example.com"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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