add test
This commit is contained in:
parent
939f6fd768
commit
37a7430d81
|
@ -62,4 +62,19 @@ describe GitHubChangelogGenerator::Parser do
|
|||
it { is_expected.to match_array([nil, nil]) }
|
||||
end
|
||||
end
|
||||
describe ".fetch_user_and_project" do
|
||||
before :each do
|
||||
ARGV = ["https://github.com/skywinder/github-changelog-generator"]
|
||||
end
|
||||
context do
|
||||
let(:valid_user) { "initialized_user" }
|
||||
let(:options) { { user: valid_user } }
|
||||
let(:options_before_change) { options.dup }
|
||||
it "should leave user unchanged" do
|
||||
expect { GitHubChangelogGenerator::Parser.fetch_user_and_project(options) }.to change { options }
|
||||
.from(options_before_change)
|
||||
.to(options_before_change.merge(project: "github-changelog-generator"))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user