Skip to content

Commit

Permalink
Expect autocomplete=off in Rails versions newer than 6.0
Browse files Browse the repository at this point in the history
The original commit 6d0dfdb even mentiones this, but somehow the comparison was including 6.0.
  • Loading branch information
andyundso committed Jan 2, 2024
1 parent 029b61f commit dc3d4dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/web/authorize_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
end

it 'should generate valid form field string' do
if Gem.loaded_specs['activesupport'].version >= Gem::Version.create('6.0')
if Gem.loaded_specs['activesupport'].version > Gem::Version.create('6.0')
expected_output = '<input type="hidden" name="merchantId" id="merchantId" value="1100000000" autocomplete="off" /><input type="hidden" name="hiddenMode" id="hiddenMode" value="yes" autocomplete="off" /><input type="hidden" name="reqtype" id="reqtype" value="NOA" autocomplete="off" /><input type="hidden" name="amount" id="amount" value="1000" autocomplete="off" /><input type="hidden" name="currency" id="currency" value="CHF" autocomplete="off" /><input type="hidden" name="useAlias" id="useAlias" value="yes" autocomplete="off" /><input type="hidden" name="sign" id="sign" value="0402fb3fba8c6fcb40df9b7756e7e637" autocomplete="off" /><input type="hidden" name="refno" id="refno" value="ABCDEF" autocomplete="off" /><input type="hidden" name="uppCustomerDetails" id="uppCustomerDetails" autocomplete="off" /><input type="hidden" name="uppCustomerEmail" id="uppCustomerEmail" value="[email protected]" autocomplete="off" />'
else
expected_output = '<input type="hidden" name="merchantId" id="merchantId" value="1100000000" /><input type="hidden" name="hiddenMode" id="hiddenMode" value="yes" /><input type="hidden" name="reqtype" id="reqtype" value="NOA" /><input type="hidden" name="amount" id="amount" value="1000" /><input type="hidden" name="currency" id="currency" value="CHF" /><input type="hidden" name="useAlias" id="useAlias" value="yes" /><input type="hidden" name="sign" id="sign" value="0402fb3fba8c6fcb40df9b7756e7e637" /><input type="hidden" name="refno" id="refno" value="ABCDEF" /><input type="hidden" name="uppCustomerDetails" id="uppCustomerDetails" /><input type="hidden" name="uppCustomerEmail" id="uppCustomerEmail" value="[email protected]" />'
Expand Down

0 comments on commit dc3d4dc

Please sign in to comment.