Skip to content

Commit 5bcc077

Browse files
lhellebrclaude
authored andcommitted
Fixes #39411 - Display locked field as yes/no in job template info
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 86a5539 commit 5bcc077

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

lib/hammer_cli_foreman_remote_execution/job_template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class InfoCommand < HammerCLIForeman::InfoCommand
2525
field :description, _('Description'), Fields::Text
2626
field :cloned_from_id, _("Cloned from id"), nil, :hide_blank => true
2727
field :template_inputs, _('Inputs')
28-
field :locked, _('Locked')
28+
field :locked, _('Locked'), Fields::Boolean
2929
HammerCLIForeman::References.taxonomies(self)
3030
end
3131

test/unit/job_template_test.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@
4040
with_params ['--id=1'] do
4141
it_should_print_columns ['ID', 'Name', 'Job Category', 'Provider', 'Type', 'Locked']
4242
end
43+
44+
it 'should format locked field as "no"' do
45+
cmd.stubs(:context).returns(ctx.update(:adapter => :base))
46+
out, _err = capture_io do
47+
cmd.run(['--id=1'])
48+
end
49+
_(out).must_match(/Locked:\s+no/)
50+
end
4351
end
4452
end
4553

0 commit comments

Comments
 (0)