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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9d464241916a44feae3e3484c748db498c538d2
4
- data.tar.gz: bb46402967e1dc1550edb662e0ce9454e8266d7a
3
+ metadata.gz: ff91bd72118815e0b2ebaf099522f1174148190d
4
+ data.tar.gz: 000c2e9c578a9abd1d277eb84c511882048a3e59
5
5
  SHA512:
6
- metadata.gz: b96bdea23b834ba5c23aae70e2c84c1e6580878ed350935eb0ac9a36be20ff94b5c84baa249e3e8490126f9ee06de4c6d97423ee2f6373b2ef6d439df9e9b1a1
7
- data.tar.gz: 1b28881f58e8bf7eeefe277974d73e633ce7cbaae809002c15d978083dc7af3e4b03fc95a6a6a3b1a77f4d4458e1753ad9dcf3e5fe6c22a8637404763a0340d7
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})
@@ -1,3 +1,3 @@
1
1
  module AmaLayout
2
- VERSION = '5.5.0'
2
+ VERSION = '5.6.0'
3
3
  end
@@ -124,9 +124,35 @@ describe AmaLayout::Navigation do
124
124
 
125
125
  context "subnavs" do
126
126
  context "driver education" do
127
- before(:each) do
128
- subject.user = OpenStruct.new navigation: "member-in-renewal-late"
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.5.0
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.7
368
+ rubygems_version: 2.6.12
369
369
  signing_key:
370
370
  specification_version: 4
371
371
  summary: ".ama.ab.ca site layouts"