Sha256: cae5df2394295b011c0235828b41943f4d6c71651dd31b73c3ac114bb9c31ad9
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
# encoding: utf-8 require 'spec_helper' describe GithubCLI::Commands::Downloads do let(:format) { {'format' => 'table'} } let(:user) { 'peter-murach' } let(:repo) { 'github_cli' } let(:api_class) { GithubCLI::Download } it "invokes download:list" do api_class.should_receive(:all).with(user, repo, {}, format) subject.invoke "download:list", [user, repo] end it "invokes download:get" do api_class.should_receive(:get).with(user, repo, 1, {}, format) subject.invoke "download:get", [user, repo, 1] end it "invokes download:create --name --size" do api_class.should_receive(:create).with(user, repo, {"name" => 'file.png', "size" => 12345}, format) subject.invoke "download:create", [user, repo], :name => 'file.png', :size => 12345 end it "invokes download:upload" do api_class.should_receive(:upload).with(user, repo, format) subject.invoke "download:upload", [user, repo] end it "invokes download:delete" do api_class.should_receive(:delete).with(user, repo, 1, {}, format) subject.invoke "download:delete", [user, repo, 1] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
github_cli-0.6.2 | spec/github_cli/commands/downloads_spec.rb |
github_cli-0.6.1 | spec/github_cli/commands/downloads_spec.rb |
github_cli-0.6.0 | spec/github_cli/commands/downloads_spec.rb |