Sha256: f730b1b4fe98af54973c664947ba2f7b573fddc1be0f7aa071671fa493f425d2

Contents?: true

Size: 918 Bytes

Versions: 2

Compression:

Stored size: 918 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Statuses do
  let(: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

2 entries across 2 versions & 1 rubygems

Version Path
github_cli-0.5.9 spec/github_cli/commands/statuses_spec.rb
github_cli-0.5.8 spec/github_cli/commands/statuses_spec.rb