Skip to content

Commit

Permalink
fixes #16302 - content-view list: include last published (#446)
Browse files Browse the repository at this point in the history
When listing the content views, include the last published date/time.
  • Loading branch information
bbuckingham authored and ehelms committed Sep 8, 2016
1 parent 29520f6 commit 60ed450
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/hammer_cli_katello/content_view.rb
Expand Up @@ -13,6 +13,7 @@ class ListCommand < HammerCLIKatello::ListCommand
field :name, _("Name")
field :label, _("Label")
field :composite, _("Composite")
field :last_published, _("Last Published"), Fields::Date, :hide_blank => true
field :repository_ids, _("Repository IDs"), Fields::List
end

Expand Down
2 changes: 2 additions & 0 deletions lib/hammer_cli_katello/content_view_version.rb
Expand Up @@ -23,6 +23,8 @@ def extend_data(version)
end

class InfoCommand < HammerCLIKatello::InfoCommand
resource :content_view_versions, :show

output do
field :id, _("ID")
field :name, _("Name")
Expand Down
14 changes: 8 additions & 6 deletions test/functional/content_view/list_test.rb
Expand Up @@ -37,9 +37,10 @@
end

ex.returns(empty_response)
expected_result = success_result("----------------|------|-------|-----------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | REPOSITORY IDS
----------------|------|-------|-----------|---------------
expected_result = success_result(
"----------------|------|-------|-----------|----------------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
----------------|------|-------|-----------|----------------|---------------
")

result = run_cmd(@cmd + params)
Expand All @@ -57,9 +58,10 @@
end

ex.returns(empty_response)
expected_result = success_result("----------------|------|-------|-----------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | REPOSITORY IDS
----------------|------|-------|-----------|---------------
expected_result = success_result(
"----------------|------|-------|-----------|----------------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
----------------|------|-------|-----------|----------------|---------------
")

result = run_cmd(@cmd + params)
Expand Down

0 comments on commit 60ed450

Please sign in to comment.