ama_layout 9.0.0 → 9.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ama_layout.gemspec +1 -1
- data/app/views/ama_layout/_breadcrumbs.html.erb +1 -1
- data/lib/ama_layout/version.rb +1 -1
- data/spec/ama_layout/decorators/agent/navigation_decorator_spec.rb +1 -1
- data/spec/ama_layout/decorators/navigation_decorator_spec.rb +2 -2
- data/spec/ama_layout/decorators/navigation_item_decorator_spec.rb +1 -1
- data/spec/ama_layout/navigation_helper_spec.rb +7 -7
- data/spec/factories/agent_navigation.rb +1 -1
- data/spec/factories/navigation.rb +1 -1
- data/spec/factories/navigation_item.rb +1 -1
- data/spec/factories/users.rb +1 -1
- data/spec/helpers/ama_layout_content_helper_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 381e5c86ac00e39b26f2d68a9241d54c141ae830
|
4
|
+
data.tar.gz: e9bf4d2558247a8009297afb0d7daf63fb87c8fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b96a24fd72eafb48a6f4f8534eafe6e56b0da0a1fdc7ce0fd7a888d94b167b9aae098039c1d9034208cfe335cc74a41d7aa4fb2e103febab978cda98df1e8b0b
|
7
|
+
data.tar.gz: 9999cc4518cd98b55aca450f78f7d9f5b1e4cebc130b154cb69e29c93d059f29be12366783f1194b00aa1f0f8919c224af45fdcc5a6ce1e17037230d0cc7db27
|
data/ama_layout.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
27
27
|
spec.add_development_dependency 'rake', '>= 11.0'
|
28
28
|
spec.add_development_dependency 'rspec-rails'
|
29
|
-
spec.add_development_dependency '
|
29
|
+
spec.add_development_dependency 'factory_bot'
|
30
30
|
spec.add_development_dependency 'simplecov'
|
31
31
|
spec.add_development_dependency 'pry'
|
32
32
|
spec.add_development_dependency 'combustion'
|
data/lib/ama_layout/version.rb
CHANGED
@@ -2,7 +2,7 @@ describe AmaLayout::Agent::NavigationDecorator do
|
|
2
2
|
let(:name) { "John D" }
|
3
3
|
let(:cash_drawer) { OpenStruct.new(name: 'Edmonton Main') }
|
4
4
|
let(:user) { OpenStruct.new(email: 'john.doe@test.com', cash_drawers: [cash_drawer]) }
|
5
|
-
let(:navigation) {
|
5
|
+
let(:navigation) { FactoryBot.build(:agent_navigation, user: user, display_name: name) }
|
6
6
|
let(:navigation_presenter) { navigation.decorate }
|
7
7
|
|
8
8
|
describe "#display_name_text" do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
describe AmaLayout::NavigationDecorator do
|
2
|
-
let(:navigation) {
|
2
|
+
let(:navigation) { FactoryBot.build(:navigation) }
|
3
3
|
let(:navigation_presenter) { navigation.decorate }
|
4
4
|
|
5
5
|
before(:each) do
|
@@ -166,7 +166,7 @@ describe AmaLayout::NavigationDecorator do
|
|
166
166
|
end
|
167
167
|
let(:notification_set) { AmaLayout::NotificationSet.new(store, 1) }
|
168
168
|
let(:user) { OpenStruct.new(navigation: 'member', notifications: notification_set) }
|
169
|
-
let(:navigation) {
|
169
|
+
let(:navigation) { FactoryBot.build :navigation, user: user }
|
170
170
|
subject { described_class.new(navigation) }
|
171
171
|
|
172
172
|
around(:each) do |example|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
describe AmaLayout::NavigationItemDecorator do
|
2
|
-
let(:navigation_item) {
|
2
|
+
let(:navigation_item) { FactoryBot.build(:navigation_item) }
|
3
3
|
let(:navigation_item_presenter) { navigation_item.decorate }
|
4
4
|
let(:items) { [{ text: "Othersite Overview", link: "http://othersite.com"}] }
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
describe AmaLayout::NavigationHelper do
|
2
|
-
subject {
|
2
|
+
subject { FactoryBot.create(:user) }
|
3
3
|
|
4
4
|
describe '#navigation' do
|
5
5
|
before(:each) do
|
@@ -7,7 +7,7 @@ describe AmaLayout::NavigationHelper do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
context 'non-member' do
|
10
|
-
subject {
|
10
|
+
subject { FactoryBot.create(:user, :non_member) }
|
11
11
|
|
12
12
|
it 'shows non-member sidebar menu' do
|
13
13
|
expect(subject.navigation).to eq 'non-member'
|
@@ -21,7 +21,7 @@ describe AmaLayout::NavigationHelper do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
context 'member with accr' do
|
24
|
-
subject {
|
24
|
+
subject { FactoryBot.create(:user, :with_accr) }
|
25
25
|
|
26
26
|
it 'shows member sidebar menu' do
|
27
27
|
expect(subject.navigation).to eq 'member'
|
@@ -29,7 +29,7 @@ describe AmaLayout::NavigationHelper do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
context 'member with mpp' do
|
32
|
-
subject {
|
32
|
+
subject { FactoryBot.create(:user, :with_mpp) }
|
33
33
|
|
34
34
|
it 'shows member sidebar menu' do
|
35
35
|
expect(subject.navigation).to eq 'member'
|
@@ -37,7 +37,7 @@ describe AmaLayout::NavigationHelper do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
context 'member in-renewal' do
|
40
|
-
subject {
|
40
|
+
subject { FactoryBot.create(:user, :in_renewal) }
|
41
41
|
|
42
42
|
it 'shows in-renewal sidebar menu' do
|
43
43
|
expect(subject.navigation).to eq 'member-in-renewal'
|
@@ -45,7 +45,7 @@ describe AmaLayout::NavigationHelper do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
context 'member in-renewal late' do
|
48
|
-
subject {
|
48
|
+
subject { FactoryBot.create(:user, :in_renewal_late) }
|
49
49
|
|
50
50
|
it 'shows in-renewal-late sidebar menu' do
|
51
51
|
expect(subject.navigation).to eq 'member-in-renewal-late'
|
@@ -53,7 +53,7 @@ describe AmaLayout::NavigationHelper do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
context 'member with outstanding balance' do
|
56
|
-
subject {
|
56
|
+
subject { FactoryBot.create(:user, :outstanding_balance) }
|
57
57
|
|
58
58
|
it 'shows member-with-outstanding-balance sidebar menu' do
|
59
59
|
expect(subject.navigation).to eq 'member-with-outstanding-balance'
|
data/spec/factories/users.rb
CHANGED
@@ -3,7 +3,7 @@ describe AmaLayoutContentHelper do
|
|
3
3
|
let(:site_name) { "Waffle Emporium" }
|
4
4
|
let(:site_domain) { "http://waffleemporium.ca" }
|
5
5
|
let(:site_url) { "#{site_domain}/wafflesauce" }
|
6
|
-
let(:nav_item) {
|
6
|
+
let(:nav_item) { FactoryBot.build(:navigation_item) }
|
7
7
|
|
8
8
|
describe "#greeting" do
|
9
9
|
it "returns the greeting set in the domain cookie" do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'simplecov'
|
2
|
-
require '
|
2
|
+
require 'factory_bot'
|
3
3
|
require 'ama_layout'
|
4
4
|
require 'pry'
|
5
5
|
require 'rspec/rails'
|
@@ -12,7 +12,7 @@ Combustion.initialize! :all
|
|
12
12
|
|
13
13
|
Dir['./spec/support/**/*.rb'].sort.each { |file| require file }
|
14
14
|
|
15
|
-
|
15
|
+
FactoryBot.find_definitions
|
16
16
|
|
17
17
|
ActionView::TestCase::TestController.instance_eval do
|
18
18
|
helper Rails.application.routes.url_helpers
|
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: 9.
|
4
|
+
version: 9.1.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:
|
21
|
+
date: 2018-01-03 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: foundation-rails
|
@@ -133,7 +133,7 @@ dependencies:
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
|
-
name:
|
136
|
+
name: factory_bot
|
137
137
|
requirement: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
139
|
- - ">="
|