Sha256: 33839649567efa470da5c6b96e15beb5808c8b09615bb3e4d4364daa5e691294

Contents?: true

Size: 764 Bytes

Versions: 6

Compression:

Stored size: 764 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Tags do
  let(:format) { 'table' }
  let(:user)   { 'peter-murach' }
  let(:repo)   { 'github_cli' }
  let(:sha)    { '3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15' }
  let(:api_class) { GithubCLI::Tag }

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

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

  it "invokes tag:create --object" do
    api_class.should_receive(:create).with(user, repo, {'object' => sha}, format)
    subject.invoke "tag:create", [user, repo], :object => sha
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
github_cli-0.5.9 spec/github_cli/commands/tags_spec.rb
github_cli-0.5.8 spec/github_cli/commands/tags_spec.rb
github_cli-0.5.7 spec/github_cli/commands/tags_spec.rb
github_cli-0.5.6 spec/github_cli/commands/tags_spec.rb
github_cli-0.5.5 spec/github_cli/commands/tags_spec.rb
github_cli-0.5.4 spec/github_cli/commands/tags_spec.rb