Skip to content

Commit

Permalink
Merge pull request #4933 from himdel/fix-17475
Browse files Browse the repository at this point in the history
Fix compliance travis - save records after changing compliances
  • Loading branch information
h-kataria authored Nov 16, 2018
2 parents 158b6aa + c6eb1e6 commit ab78538
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions spec/helpers/compliance_summary_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,25 @@

it "#textual_compliance_status" do
@record.compliances = [@compliance1]
@record.save
date = @compliance1.timestamp
expect(helper.textual_compliance_status).to eq(:label => "Status",
:icon => "pficon pficon-ok",
:value => "Compliant as of #{time_ago_in_words(date.in_time_zone(Time.zone)).titleize} Ago",
:title => "Show Details of Compliance Check on #{format_timezone(date)}",
:explorer => true,
:link => "/vm_infra/show?count=1&display=compliance_history")
:link => "/vm_infra/show/#{@record.id}?count=1&display=compliance_history")
end

it "#textual_compliance_history" do
@record.compliances = [@compliance1, @compliance2]
@record.save
expect(helper.textual_compliance_history).to eq(:label => "History",
:icon => "pficon pficon-history",
:value => "Available",
:explorer => true,
:title => "Show Compliance History of this VM or Template (Last 10 Checks)",
:link => "/vm_infra/show?display=compliance_history")
:link => "/vm_infra/show/#{@record.id}?display=compliance_history")
end
end

Expand All @@ -46,21 +48,23 @@

it "#textual_compliance_status" do
@record.compliances = [@compliance1]
@record.save
date = @compliance1.timestamp
expect(helper.textual_compliance_status).to eq(:label => "Status",
:icon => "pficon pficon-ok",
:value => "Compliant as of #{time_ago_in_words(date.in_time_zone(Time.zone)).titleize} Ago",
:title => "Show Details of Compliance Check on #{format_timezone(date)}",
:link => "/host/show?count=1&display=compliance_history")
:link => "/host/show/#{@record.id}?count=1&display=compliance_history")
end

it "#textual_compliance_history" do
@record.compliances = [@compliance1, @compliance2]
@record.save
expect(helper.textual_compliance_history).to eq(:label => "History",
:icon => "pficon pficon-history",
:value => "Available",
:title => "Show Compliance History of this Host / Node (Last 10 Checks)",
:link => "/host/show?display=compliance_history")
:link => "/host/show/#{@record.id}?display=compliance_history")
end
end
end

0 comments on commit ab78538

Please sign in to comment.