Skip to content

Commit

Permalink
SystemRole imports the 'additional_dialogs' setting
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Mar 13, 2017
1 parent 46c4b9f commit 33f18f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib/installation/system_role.rb
Expand Up @@ -164,6 +164,7 @@ def from_control(raw_role)
description: Yast::ProductControl.GetTranslatedText("#{id}_description")
)

role["additional_dialogs"] = raw_role["additional_dialogs"]
role["services"] = raw_role["services"] || []
role["no_default"] = raw_role["no_default"] || false

Expand Down
9 changes: 7 additions & 2 deletions test/system_role_test.rb
Expand Up @@ -94,13 +94,18 @@

describe ".from_control" do
it "creates a new instance of SystemRole based on a control file role entry definition" do
raw_role = { "id" => "raw_role", "services" => [{ "name" => "services_one" }] }
raw_role = {
"id" => "raw_role",
"services" => [{ "name" => "services_one" }],
"additional_dialogs" => "dialog"
}

system_role = described_class.from_control(raw_role)

expect(system_role.class).to eql(described_class)
expect(system_role.id).to eql("raw_role")
expect(system_role["services"].size).to eql(1)
expect(system_role["services"]).to eq([{"name" => "services_one"}])
expect(system_role["additional_dialogs"]).to eq("dialog")
end
end

Expand Down

0 comments on commit 33f18f7

Please sign in to comment.