ama_layout 5.5.0 → 5.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ama_layout/navigation.rb +4 -0
- data/lib/ama_layout/version.rb +1 -1
- data/spec/ama_layout/navigation_spec.rb +28 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff91bd72118815e0b2ebaf099522f1174148190d
|
4
|
+
data.tar.gz: 000c2e9c578a9abd1d277eb84c511882048a3e59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4a285e25b076bd864d750f1021961eb2d73a7aeeb3da8ec0cf87be1359c2c383e1de06fef8b0cc4d5ee5661b4039cb74ee6b01668f1c010bcb493e45ccba13b
|
7
|
+
data.tar.gz: 3368542892732acab63e622b16312608fb78844536b05eebf92b71621e403275a2dbcd558481e46b56d16a3e7fbecc719662ab440d977f4a29bb7b3903f94532
|
@@ -26,6 +26,10 @@ module AmaLayout
|
|
26
26
|
"member-in-renewal-late"
|
27
27
|
end
|
28
28
|
|
29
|
+
cattr_accessor :member_with_outstanding_balance do
|
30
|
+
"member-with-outstanding-balance"
|
31
|
+
end
|
32
|
+
|
29
33
|
def items
|
30
34
|
navigation_items.fetch(user.try(:navigation), []).map do |n|
|
31
35
|
NavigationItem.new n.merge({ current_url: current_url})
|
data/lib/ama_layout/version.rb
CHANGED
@@ -124,9 +124,35 @@ describe AmaLayout::Navigation do
|
|
124
124
|
|
125
125
|
context "subnavs" do
|
126
126
|
context "driver education" do
|
127
|
-
|
128
|
-
|
127
|
+
let(:driver_education_subnav) { subject.items[2].sub_nav }
|
128
|
+
|
129
|
+
it "return the subnav items" do
|
130
|
+
expect(driver_education_subnav[0].text).to eq "Driver Education Overview"
|
131
|
+
expect(driver_education_subnav[0].link).to eq "#{driveredonline_site}/"
|
132
|
+
|
133
|
+
expect(driver_education_subnav[1].text).to eq "New Driver Online Program"
|
134
|
+
expect(driver_education_subnav[1].link).to eq "#{driveredonline_site}/dashboard"
|
129
135
|
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
context "member-with-outstanding-balance" do
|
141
|
+
before(:each) do
|
142
|
+
subject.user = OpenStruct.new navigation: "member-with-outstanding-balance"
|
143
|
+
end
|
144
|
+
|
145
|
+
context "main nav" do
|
146
|
+
it "return the main nav items" do
|
147
|
+
expect(subject.items[0].text).to eq "Account Dashboard"
|
148
|
+
expect(subject.items[0].link).to eq "#{gatekeeper_site}/"
|
149
|
+
expect(subject.items[1].text).to eq "Pay Outstanding Balance"
|
150
|
+
expect(subject.items[1].link).to eq "#{youraccount_site}/renew"
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
context "subnavs" do
|
155
|
+
context "driver education" do
|
130
156
|
let(:driver_education_subnav) { subject.items[2].sub_nav }
|
131
157
|
|
132
158
|
it "return the subnav items" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ama_layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van den Beuken
|
@@ -365,7 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
365
365
|
version: '0'
|
366
366
|
requirements: []
|
367
367
|
rubyforge_project:
|
368
|
-
rubygems_version: 2.6.
|
368
|
+
rubygems_version: 2.6.12
|
369
369
|
signing_key:
|
370
370
|
specification_version: 4
|
371
371
|
summary: ".ama.ab.ca site layouts"
|