diff options
| author | Zog | 2018-05-31 14:02:22 +0200 |
|---|---|---|
| committer | Zog | 2018-05-31 14:02:22 +0200 |
| commit | bd865f2ef88ccb6def1364149b742a49394187bb (patch) | |
| tree | 66643eb3b84455158c1174cb2ec3e58929f82234 /spec/features | |
| parent | 868222a77361068a84eb31a2878b77d275f45df8 (diff) | |
| download | chouette-core-7161-spring-cleaning.tar.bz2 | |
Diffstat (limited to 'spec/features')
| -rw-r--r-- | spec/features/referential_companies_spec.rb | 41 | ||||
| -rw-r--r-- | spec/features/referential_group_of_lines_spec.rb | 34 | ||||
| -rw-r--r-- | spec/features/referential_networks_spec.rb | 41 |
3 files changed, 0 insertions, 116 deletions
diff --git a/spec/features/referential_companies_spec.rb b/spec/features/referential_companies_spec.rb deleted file mode 100644 index 82f86b192..000000000 --- a/spec/features/referential_companies_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -require 'spec_helper' - -describe 'ReferentialCompanies', type: :feature do - login_user - - let(:referential) { Referential.first } - let!(:companies) { Array.new(2) { create :company, line_referential: referential.line_referential } } - - describe 'index' do - before(:each) { visit referential_companies_path(referential) } - - it 'displays referential companies' do - expect(page).to have_content(companies.first.name) - expect(page).to have_content(companies.last.name) - end - - context 'filtering' do - it 'supports filtering by name' do - fill_in 'q[name_or_objectid_cont]', with: companies.first.name - click_button 'search-btn' - expect(page).to have_content(companies.first.name) - expect(page).not_to have_content(companies.last.name) - end - - it 'supports filtering by objectid' do - fill_in 'q[name_or_objectid_cont]', with: companies.first.objectid - click_button 'search-btn' - expect(page).to have_content(companies.first.name) - expect(page).not_to have_content(companies.last.name) - end - end - end - - describe 'show' do - it 'displays referential company' do - visit referential_company_path(referential, companies.first) - expect(page).to have_content(companies.first.name) - end - end -end diff --git a/spec/features/referential_group_of_lines_spec.rb b/spec/features/referential_group_of_lines_spec.rb deleted file mode 100644 index e5970545b..000000000 --- a/spec/features/referential_group_of_lines_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -require 'spec_helper' - -describe 'ReferentialLines', type: :feature do - login_user - - let(:referential) { Referential.first } - let!(:group_of_lines) { Array.new(2) { create(:group_of_line, line_referential: referential.line_referential) } } - - describe 'index' do - before(:each) { visit referential_group_of_lines_path(referential) } - - it 'displays referential groups of lines' do - expect(page).to have_content(group_of_lines.first.name) - expect(page).to have_content(group_of_lines.last.name) - end - - context 'filtering' do - it 'supports filtering by name' do - fill_in 'q[name_cont]', with: group_of_lines.first.name - click_button 'search-btn' - expect(page).to have_content(group_of_lines.first.name) - expect(page).not_to have_content(group_of_lines.last.name) - end - end - end - - describe 'show' do - it 'displays referential group of lines' do - visit referential_group_of_line_path(referential, group_of_lines.first) - expect(page).to have_content(group_of_lines.first.name) - end - end -end diff --git a/spec/features/referential_networks_spec.rb b/spec/features/referential_networks_spec.rb deleted file mode 100644 index d0a9db5f4..000000000 --- a/spec/features/referential_networks_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -require 'spec_helper' - -describe 'ReferentialNetworks', type: :feature do - login_user - - let(:referential) { Referential.first } - let!(:networks) { Array.new(2) { create :network, line_referential: referential.line_referential } } - - describe 'index' do - before(:each) { visit referential_networks_path(referential) } - - it 'displays referential networks' do - expect(page).to have_content(networks.first.name) - expect(page).to have_content(networks.last.name) - end - - context 'filtering' do - it 'supports filtering by name' do - fill_in 'q[name_or_objectid_cont]', with: networks.first.name - click_button 'search_btn' - expect(page).to have_content(networks.first.name) - expect(page).not_to have_content(networks.last.name) - end - - it 'supports filtering by objectid' do - fill_in 'q[name_or_objectid_cont]', with: networks.first.objectid - click_button 'search_btn' - expect(page).to have_content(networks.first.name) - expect(page).not_to have_content(networks.last.name) - end - end - end - - describe 'show' do - it 'displays referential network' do - visit referential_network_path(referential, networks.first) - expect(page).to have_content(networks.first.name) - end - end -end |
