spec/features/rule_spec.rb in marty-2.0.0 vs spec/features/rule_spec.rb in marty-2.0.1

- old
+ new

@@ -115,12 +115,12 @@ "computed_guards"=>"", "grids"=>"", "results"=>"", }) - r = Gemini::MyRule.lookup('infinity','abc') - expect(r.as_json).to include({"user_id"=>1, + r = Gemini::MyRule.lookup('infinity','abc', {"no_convert"=>true}) + expect(r.attributes).to include({"user_id"=>1, "o_user_id"=>nil, "name"=>"abc", "engine"=>"Gemini::MyRuleScriptSet", "rule_type"=>"SimpleRule", "simple_guards"=>{"g_bool"=>false, @@ -170,11 +170,11 @@ "computed_guards"=>"", "grids"=>"{\"grid1\":\"DataGrid1\",\"grid2\":\"DataGrid2\"}", "results"=>"", } r = Gemini::MyRule.lookup('infinity','abc') - expect(r.as_json["simple_guards"]["g_nullbool"]).to eq(false) + expect(r["simple_guards"]["g_nullbool"]).to eq(false) expect(mrv.get_row_vals(1)).to include(exp) # grid edits press("Edit") netzke_find('Grid2', 'combobox').select_values("---") press("OK") @@ -187,11 +187,11 @@ wait_for_ajax expect(mrv.get_row_vals(1)).to include(exp+{"g_nullbool"=>"", "grids"=> "{\"grid1\":\"DataGrid1\"}"}) r = Gemini::MyRule.lookup('infinity','abc') - expect(r.as_json["simple_guards"]).not_to include('g_nullbool') + expect(r["simple_guards"]).not_to include('g_nullbool') # computed fields press("Edit") fill_in(:computed_guards, with: 'sadf asdf ljsf') press("OK") wait_for_ajax @@ -238,11 +238,11 @@ press("Edit") fill_in("Range Guard 1", with: "[100,200)") fill_in("Range Guard 2", with: "[30,40)") press("OK") r = Gemini::XyzRule.get_matches('infinity', {}, {"g_range1"=> 150, - "g_range2"=> 35}) - + "g_range2"=> 35}, + {"no_convert"=>true}) expect(r.to_a.count).to eq(1) exp = {"user_id"=>1, "o_user_id"=>nil, "name"=>"ZRule1", "engine"=>"Gemini::XyzRuleScriptSet",