@@ -10,25 +10,25 @@ class ContentItemsControllerTest < ActionController::TestCase
10
10
govuk_base_path : "/career-skills-and-training" ,
11
11
title : "Get In Go Far" ,
12
12
description : "Search thousands of apprenticeships from great companies, with more added every day." ,
13
- href : "<a href= \" https://www.getingofar.gov.uk/\" > " ,
13
+ href : "https://www.getingofar.gov.uk/" ,
14
14
} ,
15
15
eating : {
16
16
govuk_base_path : "/free-school-transport" ,
17
17
title : "How healthy is your food?" ,
18
18
description : "Find out more about calories, the benefits of eating well and simple ways you can make a change." ,
19
- href : "<a href= \" https://www.nhs.uk/oneyou/eating\" > " ,
19
+ href : "https://www.nhs.uk/oneyou/eating" ,
20
20
} ,
21
21
check_your_pay : {
22
22
govuk_base_path : "/pay-and-work-rights" ,
23
23
title : "Check Your Pay" ,
24
24
description : "Are you being underpaid? Find out if your employer is giving you less than the legal minimum." ,
25
- href : "<a href= \" https://checkyourpay.campaign.gov.uk\" > " ,
25
+ href : "https://checkyourpay.campaign.gov.uk" ,
26
26
} ,
27
27
your_pension : {
28
28
govuk_base_path : "/armed-forces-pension-calculator" ,
29
29
title : "Get to know your state pension" ,
30
30
description : "Get an online forecast to tell you how much you might get, and the earliest you can claim it." ,
31
- href : "<a href= \" https://www.yourpension.gov.uk/\" >"
31
+ href : "https://www.yourpension.gov.uk/" ,
32
32
}
33
33
} . freeze
34
34
@@ -61,7 +61,7 @@ class ContentItemsControllerTest < ActionController::TestCase
61
61
assert_match ( "blue-box-campaign" , response . body )
62
62
assert_match ( value [ :title ] , response . body )
63
63
assert_match ( value [ :description ] , response . body )
64
- assert_match ( value [ :href ] , response . body )
64
+ assert_select ( "a:match('href', ?)" , value [ :href ] )
65
65
end
66
66
end
67
67
end
@@ -80,7 +80,7 @@ class ContentItemsControllerTest < ActionController::TestCase
80
80
assert_match ( "native-campaign" , response . body )
81
81
assert_match ( value [ :title ] , response . body )
82
82
assert_match ( value [ :description ] , response . body )
83
- assert_match ( value [ :href ] , response . body )
83
+ assert_select ( "a:match('href', ?)" , value [ :href ] )
84
84
end
85
85
end
86
86
end
0 commit comments