Skip to content

Commit

Permalink
added test for SubstMixin#exp_replace_qs_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
yrudman committed Mar 29, 2018
1 parent c8cbb6b commit 3d65dc0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/lib/miq_expression/subst_mixin_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
RSpec.describe MiqExpression::SubstMixin do
let(:test_class) { Class.new { include MiqExpression::SubstMixin } }
let(:test_obj) { test_class.new }

describe "#exp_replace_qs_tokens" do
it "removes :token key from passed expression" do
exp = {"=" => {"field" => "Vm-active", "value" => "true"}, :token => 1}
test_obj.exp_replace_qs_tokens(exp, {})
expect(exp).to eq("=" => {"field" => "Vm-active", "value" => "true"})
end
end
end

0 comments on commit 3d65dc0

Please sign in to comment.