Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #448 from yast/fix_autoyast_config_crash
Fix autoyast config crash
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
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,41 @@ | ||
#!/usr/bin/env rspec | ||
# ------------------------------------------------------------------------------ | ||
# Copyright (c) 2019 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. | ||
# ------------------------------------------------------------------------------ | ||
|
||
require_relative "../../spec_helper" | ||
require "registration/ui/autoyast_addon_dialog" | ||
|
||
describe Registration::UI::AutoyastAddonDialog do | ||
subject(:dialog) { described_class.new(addons) } | ||
|
||
let(:addons) { [addon] } | ||
|
||
let(:addon) do | ||
{ | ||
"name" => "free_cool_in_addon", | ||
"version" => "666", | ||
"arch" => "s390x", | ||
"release_type" => nil, | ||
"reg_code" => "hell_driven_delevopment" | ||
} | ||
end | ||
|
||
describe "#run" do | ||
before do | ||
allow(Yast::UI).to receive(:UserInput).and_return(:next) | ||
end | ||
|
||
it "does not crash" do | ||
expect { dialog.run }.to_not raise_error | ||
end | ||
end | ||
end |