Revision 9d43fc71
Added by Michael Moll almost 6 years ago
test/models/fact_value_test.rb | ||
---|---|---|
end
|
||
|
||
test "should return the count of each fact" do
|
||
h = [{:label=>"some value", :data=>1}]
|
||
h = [{:label => "some value", :data => 1}]
|
||
assert_equal h, FactValue.count_each("my_facting_name")
|
||
|
||
# Now creating a new fact value
|
||
@other_host = FactoryBot.create(:host)
|
||
FactValue.create(:value => "some value", :host => @other_host, :fact_name => @fact_name)
|
||
h = [{:label=>"some value", :data=>2}]
|
||
h = [{:label => "some value", :data => 2}]
|
||
assert_equal h, FactValue.count_each("my_facting_name")
|
||
end
|
||
|
Also available in: Unified diff
Fixes #19789 - fix Layout/SpaceAroundOperators cop