File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def initialize(options, silence: false)
19
19
end
20
20
end
21
21
22
- check_uk_key
22
+ check_uk_key ( silence )
23
23
end
24
24
25
25
def []( key )
@@ -32,11 +32,11 @@ def dig(*keys)
32
32
33
33
private
34
34
35
- def check_uk_key
35
+ def check_uk_key ( silence )
36
36
return if @options [ :uk ] != true || silence
37
37
38
38
puts 'DEPRECATED: The option :uk is not allowed to be set to `true` anymore. ' \
39
- 'Using the HMRC API requires authentication credentials.'
39
+ 'Instead it needs to be set to your HMRC API authentication credentials.'
40
40
end
41
41
end
42
42
Original file line number Diff line number Diff line change 46
46
end . to output ( "DEPRECATED: The option :savon is deprecated. Use :http instead.\n " ) . to_stdout
47
47
end
48
48
end
49
+
50
+ context 'when options contains deprecated key uk set to true' do
51
+ it 'prints deprecation warning' do
52
+ expect do
53
+ described_class . new ( { uk : true } )
54
+ end . to output (
55
+ 'DEPRECATED: The option :uk is not allowed to be set to `true` anymore. ' \
56
+ "Instead it needs to be set to your HMRC API authentication credentials.\n "
57
+ ) . to_stdout
58
+ end
59
+ end
49
60
end
50
61
end
You can’t perform that action at this time.
0 commit comments