test/test_live_api.rb in datasift-0.2.0 vs test/test_live_api.rb in datasift-1.0.0

- old
+ new

@@ -24,13 +24,13 @@ should "have the correct hash" do @definition.compile() assert_equal @testdata['definition_hash'], @definition.hash end - should "have a positive cost" do + should "have a positive DPU" do @definition.compile() - assert @definition.total_cost > 0 + assert @definition.total_dpu > 0 end should "have a valid created_at date" do @definition.compile() assert @definition.created_at @@ -52,24 +52,24 @@ assert_raise(DataSift::CompileFailedError) { @definition.compile() } assert_equal false, @definition.hash end end - context "The cost returned from a valid Definition object" do + context "The DPU returned from a valid Definition object" do setup do init() initUser(false) @definition = @user.createDefinition(@testdata['definition']) - @cost = @definition.getCostBreakdown() + @dpu = @definition.getDPUBreakdown() end - should "contain valid cost data" do - assert @cost.has_key?('costs') - assert @cost.has_key?('total') + should "contain valid DPU data" do + assert @dpu.has_key?('detail') + assert @dpu.has_key?('dpu') end - should "have a positive total cost" do - assert @cost['total'] > 0 + should "have a positive total DPU" do + assert @dpu['dpu'] > 0 end end context "Buffered data returned by a valid Definition object" do setup do