Sha256: 78b41c22a4a6d4cc247f08d03e1fc7a793a115643db12ef4d4c5719f346a3a2a

Contents?: true

Size: 978 Bytes

Versions: 6

Compression:

Stored size: 978 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Keys do
  let(:format) { 'table' }
  let(:id)     { 1 }
  let(:user)   { 'peter-murach' }
  let(:repo)   { 'github' }
  let(:api_class) { GithubCLI::Key }

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

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

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

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

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