Sha256: 6b753f143b5cd45974a0c94f3243dfad2f9ae43154c8eea31b0fde1298a01fb7
Contents?: true
Size: 765 Bytes
Versions: 22
Compression:
Stored size: 765 Bytes
Contents
require 'spec_helper' describe 'assertions' do describe 'json assertion' do let(:doc) do test do visit '/' do assert json: '.key', value: 'value' end end.to_doc end let(:fragment) { doc.search('//com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion').first } it 'should match on expected value' do expect(fragment.search(".//stringProp[@name='EXPECTED_VALUE']").text).to eq "value" end it 'should match on json path' do expect(fragment.search(".//stringProp[@name='JSON_PATH']").text).to eq ".key" end it 'should have json validation by default' do expect(fragment.search(".//boolProp[@name='JSONVALIDATION']").text).to eq "true" end end end
Version data entries
22 entries across 22 versions & 1 rubygems