Skip to content

Commit

Permalink
Update test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Nov 19, 2019
1 parent e2b142a commit 19f9fe3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions library/packages/test/y2packager/license_test.rb
Expand Up @@ -34,14 +34,16 @@

describe ".find" do
context "when some content is given" do
before do
allow(Y2Packager::License).to receive(:new)
.with(product_name: "SLES", fetcher: fetcher, handler: handler, content: content)
.and_return(license)
it "does not look for a license fetcher" do
expect(Y2Packager::LicensesFetchers).to_not receive(:for)

described_class.find("SLES", content: content)
end

it "uses the content as license's content" do
expect(described_class.find("SLES", content: content)).to be(license)
it "uses the content as a license's text" do
product_license = described_class.find("SLES", content: content)

expect(product_license.content_for).to eq(content)
end
end

Expand Down

0 comments on commit 19f9fe3

Please sign in to comment.