Skip to content

Commit

Permalink
Resolve some test deprecation warnings
Browse files Browse the repository at this point in the history
Resolved due to messages like:

> DEPRECATED: Use assert_nil if expecting nil from test/services/request_helper_test.rb:7.
> This will fail in Minitest 6.
  • Loading branch information
sihugh committed Sep 10, 2019
1 parent a3f437c commit bea1e5e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/helpers/application_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ApplicationHelperTest < ActionView::TestCase

test "#t_locale_fallback returns nil for a string with a locale translation" do
fallback = t_locale_fallback("content_item.schema_name.imported", count: 1, locale: :de)
assert_equal nil, fallback
assert_nil fallback
end

test "#t_locale_fallback returns default locale for a string with no locale translation" do
Expand Down
2 changes: 1 addition & 1 deletion test/models/http_feature_flags_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class HttpFeatureFlagsTest < ActiveSupport::TestCase

feature_flag_value = instance.get_feature_flag('USE_MAGIC')

assert_equal nil, feature_flag_value
assert_nil feature_flag_value
end

test 'get_feature_flag returns feature flag value when feature flag exists' do
Expand Down
2 changes: 1 addition & 1 deletion test/services/request_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class RequestHelperTest < ActiveSupport::TestCase
test 'get_header returns nil when header does not exist' do
header_val = RequestHelper.get_header('Govuk-Example-Header', {})

assert_equal nil, header_val
assert_nil header_val
end

test 'get_header returns header when header exists' do
Expand Down

0 comments on commit bea1e5e

Please sign in to comment.