aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features
diff options
context:
space:
mode:
authorLuc Donnet2018-01-02 11:55:02 +0100
committerGitHub2018-01-02 11:55:02 +0100
commitab48fee5d8540e839a29abb9c196303ff7a2e9af (patch)
treecd024143cce12aa6b3e50eebdf00b2cb48407924 /spec/features
parent7c6522fe4d0d4522a3d192fb0a0439eb92668b52 (diff)
parent25e039b3de2b45526b233c3ef4d95bb4c9f40a18 (diff)
downloadchouette-core-ab48fee5d8540e839a29abb9c196303ff7a2e9af.tar.bz2
Merge pull request #186 from af83/5102-begin_of_association_chain
5102 Use current_organisation as begin_of_association_chain
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/companies_spec.rb2
-rw-r--r--spec/features/group_of_lines_permissions_spec.rb4
-rw-r--r--spec/features/group_of_lines_spec.rb2
-rw-r--r--spec/features/lines_spec.rb3
-rw-r--r--spec/features/networks_spec.rb2
5 files changed, 7 insertions, 6 deletions
diff --git a/spec/features/companies_spec.rb b/spec/features/companies_spec.rb
index 1b9dae56f..4e778b3a0 100644
--- a/spec/features/companies_spec.rb
+++ b/spec/features/companies_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
describe "Companies", :type => :feature do
login_user
- let(:line_referential) { create :line_referential }
+ let(:line_referential) { create :line_referential, member: @user.organisation }
let!(:companies) { Array.new(2) { create :company, line_referential: line_referential } }
subject { companies.first }
diff --git a/spec/features/group_of_lines_permissions_spec.rb b/spec/features/group_of_lines_permissions_spec.rb
index 5c03481ec..33d78c0dd 100644
--- a/spec/features/group_of_lines_permissions_spec.rb
+++ b/spec/features/group_of_lines_permissions_spec.rb
@@ -22,7 +22,7 @@ describe "Group of lines", :type => :feature do
context 'on show view' do
let( :path ){ line_referential_group_of_line_path(line_referential, group_of_line, delete: true) }
- context 'if permissions present → ' do
+ context 'if permissions present → ' do
let( :permission ){ true }
it 'shows the appropriate buttons' do
@@ -30,7 +30,7 @@ describe "Group of lines", :type => :feature do
expect( page ).to have_link('Supprimer', href: expected_url)
end
end
- context 'if permissions absent → ' do
+ context 'if permissions absent → ' do
let( :permission ){ false }
it 'shows the appropriate buttons' do
diff --git a/spec/features/group_of_lines_spec.rb b/spec/features/group_of_lines_spec.rb
index 59101ccd5..8b88e6e9e 100644
--- a/spec/features/group_of_lines_spec.rb
+++ b/spec/features/group_of_lines_spec.rb
@@ -10,7 +10,7 @@ describe "Group of lines", :type => :feature do
let!(:group_of_lines) { Array.new(2) { create(:group_of_line, line_referential: line_referential) } }
subject { group_of_lines.first }
- let(:line_referential) { create :line_referential }
+ let(:line_referential) { create :line_referential, member: @user.organisation }
before :each do
subject.lines << line
diff --git a/spec/features/lines_spec.rb b/spec/features/lines_spec.rb
index 2a442bd2f..f142b7da9 100644
--- a/spec/features/lines_spec.rb
+++ b/spec/features/lines_spec.rb
@@ -1,7 +1,8 @@
+# coding: utf-8
describe "Lines", type: :feature do
login_user
- let(:line_referential) { create :line_referential }
+ let(:line_referential) { create :line_referential, member: @user.organisation }
let!(:network) { create(:network) }
let!(:company) { create(:company) }
let!(:lines) { Array.new(2) { create :line_with_stop_areas, network: network, company: company, line_referential: line_referential } }
diff --git a/spec/features/networks_spec.rb b/spec/features/networks_spec.rb
index 75070e7fa..1a822e7c9 100644
--- a/spec/features/networks_spec.rb
+++ b/spec/features/networks_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
describe "Networks", :type => :feature do
login_user
- let(:line_referential) { create :line_referential }
+ let(:line_referential) { create :line_referential, member: @user.organisation }
let!(:networks) { Array.new(2) { create(:network, line_referential: line_referential) } }
subject { networks.first }