ama_layout 5.7.0 → 5.8.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: 681ee492fa8e24d8f976759f37763fb2aa82a6bc
4
- data.tar.gz: 0174f1cfcb34cf34c3747af2159930a49edba280
3
+ metadata.gz: a4f2cc7166e0bee061b77582099d5aa6b3e34677
4
+ data.tar.gz: 78b1055abe0259ce09f0bed145b3cfa46414ff95
5
5
  SHA512:
6
- metadata.gz: 2329ee194ad518c686aaca74a7dac3b730d467d5e0e4952c4ec0d4b1a088d68fbf43be1f5bab0d4fc915829e3ae1f0fc891cc1645792288e9c737bbb1ad8fd7c
7
- data.tar.gz: b04fbb19aac1aed374ca4f4f14c8499dac9f055e245f8f5b869f02d018d9a23d48e2d72a0e2b05fced356f884a2981dc0a5aa59a5c6dc93299050a4f7f9fe9a7
6
+ metadata.gz: 9d6f5e8bba92eead3002bba147f13c734a2c7f753f20afffd787691ea3c7e20e6e3f236e501a3b729bb10c0c869d98e28e28c6fa011845317aa3df826758a849
7
+ data.tar.gz: 8ad54d4ad83d6aa8183fee828cadecc7ba79defed16b17f092a6e9aed769b247a6e1c755f7b8ffe69ff9bab2740bba133e1d95ee102951920641d64333a1c882
@@ -63,6 +63,10 @@ module AmaLayoutPathHelper
63
63
  "#{Rails.configuration.membership_site}/reward_cards"
64
64
  end
65
65
 
66
+ def membership_renew_path
67
+ "#{Rails.configuration.membership_site}/renews/new"
68
+ end
69
+
66
70
  def driveredonline_path
67
71
  Rails.configuration.driveredonline_site
68
72
  end
@@ -167,7 +167,7 @@ member-with-outstanding-balance:
167
167
  link: "<%= Rails.configuration.gatekeeper_site %>/"
168
168
  icon: "fa-tachometer"
169
169
  - text: "Pay Outstanding Balance"
170
- link: "<%= Rails.configuration.youraccount_site %>/renew"
170
+ link: "<%= Rails.configuration.membership_site %>/renews/new"
171
171
  icon: "fa-credit-card"
172
172
  - text: "Driver Education"
173
173
  link: "<%= Rails.configuration.driveredonline_site %>/"
@@ -3,6 +3,8 @@ module AmaLayout
3
3
  def navigation
4
4
  return AmaLayout::Navigation.non_member unless member?
5
5
  case
6
+ when _has_outstanding_balance?
7
+ AmaLayout::Navigation.member_with_outstanding_balance
6
8
  when _in_renewal_late?
7
9
  AmaLayout::Navigation.member_in_renewal_late
8
10
  when _in_renewal?
@@ -21,5 +23,9 @@ module AmaLayout
21
23
  def _in_renewal_late?
22
24
  status == "AL"
23
25
  end
26
+
27
+ def _has_outstanding_balance?
28
+ has_outstanding_balance
29
+ end
24
30
  end
25
31
  end
@@ -1,3 +1,3 @@
1
1
  module AmaLayout
2
- VERSION = '5.7.0'
2
+ VERSION = '5.8.0'
3
3
  end
@@ -51,5 +51,13 @@ describe AmaLayout::NavigationHelper do
51
51
  expect(subject.navigation).to eq 'member-in-renewal-late'
52
52
  end
53
53
  end
54
+
55
+ context 'member with outstanding balance' do
56
+ subject { FactoryGirl.create(:user, :outstanding_balance) }
57
+
58
+ it 'shows member-with-outstanding-balance sidebar menu' do
59
+ expect(subject.navigation).to eq 'member-with-outstanding-balance'
60
+ end
61
+ end
54
62
  end
55
63
  end
@@ -147,7 +147,7 @@ describe AmaLayout::Navigation do
147
147
  expect(subject.items[0].text).to eq "Account Dashboard"
148
148
  expect(subject.items[0].link).to eq "#{gatekeeper_site}/"
149
149
  expect(subject.items[1].text).to eq "Pay Outstanding Balance"
150
- expect(subject.items[1].link).to eq "#{youraccount_site}/renew"
150
+ expect(subject.items[1].link).to eq "#{membership_site}/renews/new"
151
151
  end
152
152
  end
153
153
 
@@ -111,6 +111,12 @@ describe AmaLayoutPathHelper do
111
111
  end
112
112
  end
113
113
 
114
+ describe "#membership_renew_path" do
115
+ it "returns the membership renew path" do
116
+ expect(helper.membership_renew_path).to eq "#{membership_site}/renews/new"
117
+ end
118
+ end
119
+
114
120
  describe "#driveredonline_path" do
115
121
  it "returns the driveredonile path" do
116
122
  expect(helper.driveredonline_path).to eq "#{driveredonline_site}"
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.7.0
4
+ version: 5.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van den Beuken
@@ -18,7 +18,7 @@ authors:
18
18
  autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
- date: 2017-07-06 00:00:00.000000000 Z
21
+ date: 2017-07-07 00:00:00.000000000 Z
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
24
  name: foundation-rails
@@ -376,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
376
376
  version: '0'
377
377
  requirements: []
378
378
  rubyforge_project:
379
- rubygems_version: 2.6.12
379
+ rubygems_version: 2.6.7
380
380
  signing_key:
381
381
  specification_version: 4
382
382
  summary: ".ama.ab.ca site layouts"