Sha256: 41332a8c76264a7a68d4e242699289ceb5c64332e896f3c9b4d5285c579e5263

Contents?: true

Size: 992 Bytes

Versions: 3

Compression:

Stored size: 992 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Keys do
  let(:format) { {'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

3 entries across 3 versions & 1 rubygems

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