-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing tests for reusable devices issues
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
test/y2storage/autoinst_issues/missing_reusable_device_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env rspec | ||
# encoding: utf-8 | ||
|
||
# Copyright (c) [2017] SUSE LLC | ||
# | ||
# All Rights Reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it | ||
# under the terms of version 2 of the GNU General Public License as published | ||
# by the Free Software Foundation. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
# more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, contact SUSE LLC. | ||
# | ||
# To contact SUSE LLC about this file by physical or electronic mail, you may | ||
# find current contact information at www.suse.com. | ||
|
||
require_relative "../../spec_helper" | ||
require "y2storage/autoinst_issues/missing_reuse_info" | ||
require "y2storage/autoinst_profile/partition_section" | ||
|
||
describe Y2Storage::AutoinstIssues::MissingReusableDevice do | ||
subject(:issue) { described_class.new(section) } | ||
|
||
let(:section) do | ||
instance_double(Y2Storage::AutoinstProfile::PartitionSection) | ||
end | ||
|
||
describe "#message" do | ||
it "returns a description of the issue" do | ||
expect(issue.message).to eq("Reusable device not found") | ||
end | ||
end | ||
|
||
describe "#severity" do | ||
it "returns :warn" do | ||
expect(issue.severity).to eq(:warn) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env rspec | ||
# encoding: utf-8 | ||
|
||
# Copyright (c) [2017] SUSE LLC | ||
# | ||
# All Rights Reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it | ||
# under the terms of version 2 of the GNU General Public License as published | ||
# by the Free Software Foundation. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
# more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, contact SUSE LLC. | ||
# | ||
# To contact SUSE LLC about this file by physical or electronic mail, you may | ||
# find current contact information at www.suse.com. | ||
|
||
require_relative "../../spec_helper" | ||
require "y2storage/autoinst_issues/missing_reuse_info" | ||
require "y2storage/autoinst_profile/partition_section" | ||
|
||
describe Y2Storage::AutoinstIssues::MissingReuseInfo do | ||
subject(:issue) { described_class.new(section) } | ||
|
||
let(:section) do | ||
instance_double(Y2Storage::AutoinstProfile::PartitionSection) | ||
end | ||
|
||
describe "#message" do | ||
it "returns a description of the issue" do | ||
expect(issue.message).to include "Not enough information" | ||
end | ||
end | ||
|
||
describe "#severity" do | ||
it "returns :warn" do | ||
expect(issue.severity).to eq(:warn) | ||
end | ||
end | ||
end |