Sha256: 772cc7bf3ed7cea8eebc1b71f294e8788ff638206f6755454465a3c0e222cf2d
Contents?: true
Size: 821 Bytes
Versions: 5
Compression:
Stored size: 821 Bytes
Contents
require 'test_helper' class FactValueTest < ActiveSupport::TestCase def setup @host = hosts(:one) @fact_name = FactName.create(:name => "my_facting_name") @fact_value = FactValue.create(:value => "some value", :host => @host, :fact_name => @fact_name) end # test "should return the memory average" do # p FactValue.mem_average("my_facting_name") # end test "should return the count of each fact" do h = [{:label=>"some value", :data=>1}] assert_equal h, FactValue.count_each("my_facting_name") #Now creating a new fact value @other_host = hosts(:two) other_fact_value = FactValue.create(:value => "some value", :host => @other_host, :fact_name => @fact_name) h = [{:label=>"some value", :data=>2}] assert_equal h, FactValue.count_each("my_facting_name") end end
Version data entries
5 entries across 5 versions & 1 rubygems