Sha256: 3735c880ec67a54417adb5ac07f56c9b206256511ec5efce5bf528f59fe7f5e0
Contents?: true
Size: 1.35 KB
Versions: 3
Compression:
Stored size: 1.35 KB
Contents
# encoding: utf-8 require 'spec_helper' describe GithubCLI::Commands::References do let(:format) { {'format' => 'table'} } let(:user) { 'peter-murach' } let(:repo) { 'github_cli' } let(:ref) { 'refs/master' } let(:sha) { '3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15' } let(:api_class) { GithubCLI::Reference } it "invokes ref:list" do api_class.should_receive(:list).with(user, repo, {}, format) subject.invoke "ref:list", [user, repo] end it "invokes ref:list --ref" do api_class.should_receive(:list).with(user, repo, {"ref" => ref}, format) subject.invoke "ref:list", [user, repo], :ref => ref end it "invokes ref:get" do api_class.should_receive(:get).with(user, repo, ref, {}, format) subject.invoke "ref:get", [user, repo, ref] end it "invokes ref:create --ref --sha" do api_class.should_receive(:create).with(user, repo, {"ref" => ref, "sha" => sha}, format) subject.invoke "ref:create", [user, repo], :ref => ref, :sha => sha end it "invokes ref:update --sha -f" do api_class.should_receive(:update).with(user, repo, ref, {"sha" => sha, "force" => false}, format) subject.invoke "ref:update", [user, repo, ref], :sha => sha end it "invokes ref:delete" do api_class.should_receive(:delete).with(user, repo, ref, {}, format) subject.invoke "ref:delete", [user, repo, ref] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
github_cli-0.6.2 | spec/github_cli/commands/references_spec.rb |
github_cli-0.6.1 | spec/github_cli/commands/references_spec.rb |
github_cli-0.6.0 | spec/github_cli/commands/references_spec.rb |