blob: a3eab103ae010a4729ecd90605de7f4131cdc677 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# -*- coding: utf-8 -*-
require 'spec_helper'
describe 'Line Footnotes', type: :feature do
login_user
let(:referential) { Referential.first }
#let!(:line_referential) { create :line_referential }
let!(:network) { create(:network) }
let!(:company) { create(:company) }
let!(:line) { create :line_with_stop_areas, network: network, company: company, line_referential: referential.line_referential }
let!(:footnotes) { Array.new(2) { create :footnote, line: line } }
subject { footnotes.first }
describe 'index' do
before(:each) { visit referential_line_footnotes_path(referential.line_referential, line) }
it 'displays line footnotes' do
expect(page).to have_content(subject.label)
expect(page).to have_content(subject.label)
end
it 'allows R and U in CRUD' do
expect(page).to have_content(I18n.t('actions.edit'))
expect(page).not_to have_content(I18n.t('actions.show')) # they're just displayed in index view
expect(page).not_to have_content(I18n.t('actions.destroy'))
expect(page).not_to have_content(I18n.t('actions.add'))
end
end
end
|