defra_ruby_mocks 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8db113c494c3e74f9f41a01055afcab1a917708e5ba35997d7f9dcd6829f342
4
- data.tar.gz: 6790a0a43812ae7eda27aa51096a846b1b0bda32ca2229a8c55c1bed9e3277cd
3
+ metadata.gz: 234acb79fe01017da60fcef23605cd3ff4506fefb54765f29cbe707533016ba2
4
+ data.tar.gz: 4a52336dbd39d3c03ffab8b96f7d1c4b90ca83af1dca3ffb72973635f85d40e1
5
5
  SHA512:
6
- metadata.gz: 50a22b6011b95c82f65a20033d90e0b7622381e64aa9175a328a26e27b519203a2f5a72e7e2effa247514b130a675a5390144e7d68bee270315d6c74b62dc525
7
- data.tar.gz: 3df174fcab0e99ede6b049ba26aecfb36530a476dfb2a1c5e9f7ac688cc662fca18478fa23c5d30f58fbdf1ca8d404d2f8b586078d1ba38ea0090ae88735df52
6
+ metadata.gz: 6f5256bb6536f34b6d7aa373bd02f6ba9e7c200cbfcf7c344d5f0ab127d960ba3768c73b3c150a6b4c3d46e2c405d76dd4f5ea8ab784ad9f22a852db8a330414
7
+ data.tar.gz: da3cfafbe7aa6939ca4cec698f00b982b004da1cf39bfcb97e26d72a4b219e9e6df88cea29effadfa3ccfbbb9bbbf6bb058671cd34db71b80fe9ab607e98f5ee
@@ -46,9 +46,9 @@ module DefraRubyMocks
46
46
 
47
47
  def company_name
48
48
  if resource.class.to_s == "WasteCarriersEngine::OrderCopyCardsRegistration"
49
- locate_original_registration(resource.reg_identifier).company_name.downcase
49
+ locate_original_registration(resource.reg_identifier).company_name&.downcase
50
50
  else
51
- resource.company_name.downcase
51
+ resource.company_name&.downcase
52
52
  end
53
53
  end
54
54
  end
@@ -65,6 +65,8 @@ module DefraRubyMocks
65
65
  end
66
66
 
67
67
  def payment_status
68
+ return :AUTHORISED unless @resource.company_name
69
+
68
70
  return :REFUSED if @resource.company_name.include?("reject")
69
71
  return :STUCK if @resource.company_name.include?("stuck")
70
72
  return :SENT_FOR_AUTHORISATION if @resource.company_name.include?("pending")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DefraRubyMocks
4
- VERSION = "2.3.0"
4
+ VERSION = "2.3.1"
5
5
  end