govuk_content_models 35.0.0 → 35.0.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 818153ae9ec98e66cebfcb9754ad00b7a447ffd4
|
4
|
+
data.tar.gz: e4f79124027a88b3353477a4a62853de0cc846e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5610c8661285a6a4f06889daa260e339db47318c6ecb3f3046a4f1c3f4a1e790581dfd59eb42c776a3cd8d8276cda9fd4c877111575ecf20546e965378d6922
|
7
|
+
data.tar.gz: 913527e1c41880a7a952271141656107a226d17056c2340f215f11f22e5a04970dbd85ef506e5e5235e818b177c1461759e484ae8565f8376862505a3870c5ae
|
data/CHANGELOG.md
CHANGED
@@ -27,7 +27,10 @@ module PresentationToggles
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def organ_donor_registration_key
|
30
|
-
presentation_toggles
|
30
|
+
unless presentation_toggles.key? 'organ_donor_registration'
|
31
|
+
presentation_toggles['organ_donor_registration'] = self.class.default_presentation_toggles['organ_donor_registration']
|
32
|
+
end
|
33
|
+
presentation_toggles['organ_donor_registration']
|
31
34
|
end
|
32
35
|
|
33
36
|
def promotion_choice=(value)
|
@@ -62,7 +65,10 @@ module PresentationToggles
|
|
62
65
|
end
|
63
66
|
|
64
67
|
def promotion_choice_key
|
65
|
-
presentation_toggles
|
68
|
+
unless presentation_toggles.key? 'promotion_choice'
|
69
|
+
presentation_toggles['promotion_choice'] = self.class.default_presentation_toggles['promotion_choice']
|
70
|
+
end
|
71
|
+
presentation_toggles['promotion_choice']
|
66
72
|
end
|
67
73
|
|
68
74
|
module ClassMethods
|
@@ -81,6 +81,15 @@ class CompletedTransactionEditionTest < ActiveSupport::TestCase
|
|
81
81
|
},
|
82
82
|
}
|
83
83
|
)
|
84
|
+
completed_transaction_edition.save(validate: false)
|
85
|
+
completed_transaction_edition.reload
|
86
|
+
|
87
|
+
completed_transaction_edition.promotion_choice = "register_to_vote"
|
88
|
+
completed_transaction_edition.promotion_choice_url = "https://www.gov.uk/register-to-vote"
|
89
|
+
completed_transaction_edition.save!
|
90
|
+
|
91
|
+
assert_equal "register_to_vote", completed_transaction_edition.reload.promotion_choice
|
92
|
+
assert_equal "https://www.gov.uk/register-to-vote", completed_transaction_edition.promotion_choice_url
|
84
93
|
|
85
94
|
completed_transaction_edition.promotion_choice = "none"
|
86
95
|
completed_transaction_edition.save!
|
@@ -93,13 +102,6 @@ class CompletedTransactionEditionTest < ActiveSupport::TestCase
|
|
93
102
|
|
94
103
|
assert_equal "organ_donor", completed_transaction_edition.reload.promotion_choice
|
95
104
|
assert_equal "https://www.organdonation.nhs.uk/registration/", completed_transaction_edition.promotion_choice_url
|
96
|
-
|
97
|
-
completed_transaction_edition.promotion_choice = "register_to_vote"
|
98
|
-
completed_transaction_edition.promotion_choice_url = "https://www.gov.uk/register-to-vote"
|
99
|
-
completed_transaction_edition.save!
|
100
|
-
|
101
|
-
assert_equal "register_to_vote", completed_transaction_edition.reload.promotion_choice
|
102
|
-
assert_equal "https://www.gov.uk/register-to-vote", completed_transaction_edition.promotion_choice_url
|
103
105
|
end
|
104
106
|
|
105
107
|
test "passes through legacy organ donor info" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_content_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 35.0.
|
4
|
+
version: 35.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Battley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bson_ext
|