Skip to content

Commit

Permalink
Refs #37151 - Fix tests to use correct param names and values
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz committed Dec 17, 2024
1 parent 0d45f9c commit 5854a6b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions test/functional/activation_key/content_override_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end
it "attaches a content override" do
label = "foo"
value = 'enabled'
value = 'true'
id = 20
params = ["--id=#{id}", "--content-label=#{label}", "--value=#{value}"]
ex = api_expects(:activation_keys, :content_override) do |par|
Expand All @@ -23,17 +23,17 @@
assert_cmd(expected_result, result)
end

it "attaches a content override with name" do
it "attaches a content override with --override-name" do
label = "foo"
value = 'enabled'
override_name = 'enabled'
value = 'true'
id = 20
name = 'protected'
params = ["--id=#{id}", "--content-label=#{label}", "--value=#{value}",
"--override-name=#{name}"]
"--override-name=#{override_name}"]
ex = api_expects(:activation_keys, :content_override) do |par|
par['id'] == id && par["content_overrides"][0]['content_label'] == label &&
par['content_overrides'][0]['value'] == value &&
par['content_overrides'][0]['name'] == name
par['content_overrides'][0]['name'] == override_name
end
ex.returns({})

Expand All @@ -43,17 +43,17 @@
assert_cmd(expected_result, result)
end

it "attaches a content override with value other than enabled using --force" do
it "attaches a content override with override name other than enabled using --force" do
label = "foo"
override_name = 'protected'
value = '1'
id = 20
name = 'protected'
params = ["--id=#{id}", "--content-label=#{label}", "--value=#{value}",
"--override-name=#{name}", "--force"]
"--override-name=#{override_name}", "--force"]
ex = api_expects(:activation_keys, :content_override) do |par|
par['id'] == id && par["content_overrides"][0]['content_label'] == label &&
par['content_overrides'][0]['value'] == value &&
par['content_overrides'][0]['name'] == name
par['content_overrides'][0]['name'] == override_name
end
ex.returns({})

Expand Down
18 changes: 9 additions & 9 deletions test/functional/host/subscription/content_override_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

it "attaches a content override" do
label = "foo"
value = 'enabled'
value = 'true'
id = '20'
params = ["--host-id=#{id}", "--content-label=#{label}", "--value=#{value}"]
ex = api_expects(:host_subscriptions, :content_override, "content override") do |par|
Expand All @@ -29,15 +29,15 @@

it "attaches a content override with name" do
label = "foo"
value = 'enabled'
override_name = 'enabled'
value = '1'
id = '20'
name = 'protected'
params = ["--host-id=#{id}", "--content-label=#{label}", "--value=#{value}",
"--override-name=#{name}"]
"--override-name=#{override_name}"]
ex = api_expects(:host_subscriptions, :content_override, "content override") do |par|
par['host_id'].to_s == id && par["content_overrides"][0]['content_label'] == label &&
par['content_overrides'][0]['value'] == value &&
par['content_overrides'][0]['name'] == name
par['content_overrides'][0]['name'] == override_name
end
ex.returns({})

Expand All @@ -49,15 +49,15 @@

it "attaches a content override with value other than enabled using --force" do
label = "foo"
value = 'enabled'
value = '1'
id = '20'
name = 'protected'
override_name = 'protected'
params = ["--host-id=#{id}", "--content-label=#{label}", "--value=#{value}",
"--override-name=#{name}", "--force"]
"--override-name=#{override_name}", "--force"]
ex = api_expects(:host_subscriptions, :content_override, "content override") do |par|
par['host_id'].to_s == id && par["content_overrides"][0]['content_label'] == label &&
par['content_overrides'][0]['value'] == value &&
par['content_overrides'][0]['name'] == name
par['content_overrides'][0]['name'] == override_name
end
ex.returns({})

Expand Down

0 comments on commit 5854a6b

Please sign in to comment.