aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views/lines
AgeCommit message (Collapse)Author
2018-02-09Refs 5669; Fix specs5669-specs-snpashotsZog
2018-02-09Refs #5669 @2h; Fix SpecsZog
2018-02-09Refs #5669; Add more snapshotsZog
2018-01-25Refs #5586 @1h; Ensure retrocompatibilityZog
And remove snapshots (we don't need it anymore)
2018-01-25Refs #5586 @4h; First `action_links` refactorZog
- Implement new API - Migrate the LineDecorator - ensure no change on the "lines/index" view
2017-12-21Refs #5430 @2h; Deactivate lines instead of destroying themZog
- Add `activate` and `deactivate` actions in `LinesController`, as well as corresponding routes - Add `activate!` and `deactivate!` methods in `Chouette::Line`, as well as `activated?` - Add `activate?` and `deactivate?` permissions in `LinePolicy` - Add corresponding `action_links`in the Decorator - Create helper for these actions - Add an optional `'extra_class` to the Links - Update styles for ".delete-action" to handle the case where there are several - Add I18n keys accordingly
2017-11-28Remove page title test on views specXinhui
2017-06-19lines/show.html.erb_spec.rb: Fix specs resulting from `LineDecorator`Teddy Wing
The tests failed because we weren't using a decorated `Chouette::Line` object, but the views now expect decorated lines in order to be able to call the `#action_links` method. Here are our failures: 5) /lines/show should render h1 with the line name Failure/Error: - @line.action_links.each do |link| ActionView::Template::Error: undefined method `action_links' for #<Chouette::Line:0x007fc8cdf0bb88> # ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360' # ./app/helpers/newapplication_helper.rb:246:in `block (2 levels) in pageheader' # ./app/helpers/newapplication_helper.rb:244:in `block in pageheader' # ./app/helpers/newapplication_helper.rb:243:in `pageheader' # ./app/views/lines/show.html.slim:2:in `_app_views_lines_show_html_slim___3813514632397395671_70250211127360' # ./spec/views/lines/show.html.erb_spec.rb:16:in `block (2 levels) in <top (required)>' # -e:1:in `<main>' # ------------------ # --- Caused by: --- # NoMethodError: # undefined method `action_links' for #<Chouette::Line:0x007fc8cdf0bb88> # ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360' 6) /lines/show should render a link to remove the line Failure/Error: - @line.action_links.each do |link| ActionView::Template::Error: undefined method `action_links' for #<Chouette::Line:0x007fc8cfdaa710> # ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360' # ./app/helpers/newapplication_helper.rb:246:in `block (2 levels) in pageheader' # ./app/helpers/newapplication_helper.rb:244:in `block in pageheader' # ./app/helpers/newapplication_helper.rb:243:in `pageheader' # ./app/views/lines/show.html.slim:2:in `_app_views_lines_show_html_slim___3813514632397395671_70250211127360' # ./spec/views/lines/show.html.erb_spec.rb:31:in `block (2 levels) in <top (required)>' # -e:1:in `<main>' # ------------------ # --- Caused by: --- # NoMethodError: # undefined method `action_links' for #<Chouette::Line:0x007fc8cfdaa710> # ./app/views/lines/show.html.slim:10:in `block in _app_views_lines_show_html_slim___3813514632397395671_70250211127360' Update the test to decorate the lines used in them. Turn `current_organisation` into a `context` field on `LineDecorator` because otherwise it's a global variable that comes from wherever that's required in `LineDecorator`. And we'd have to mock `current_organisation` on `line` in the test, which I wasn't keen on. Refs #3479
2017-04-11Deprecation Warnings removed; Seeds corrected, Refs: #2070RobertDober
2017-02-17fix testsjpl
2017-02-07Refs #2476 : Disable modification and deletion of resources from another ↵Vlatka Pavisic
referential; in progress
2016-11-29Refs #2019: updating lines with table builderjpl
2016-11-28Refs #2018 : Rm links to edit ReferentialLinevlatka pavisic
2016-05-15Associate LineReferential to Referential. Create ReferentialLines to manage ↵Alban Peignier
lines in Referential. Refs #826
2016-05-13Refactor models and controllers to manage Lines in LineReferential. Refs #825Alban Peignier
2015-01-05Initialize rails 4 migrationLuc Donnet
2012-06-27Use when possible a first referential created before the spec transactionAlban Peignier
2012-05-29Include html_safe an ready? in ApplicationMap#to_htmlAlban Peignier
2012-04-25fix spec for line show viewMarc Florisson
2012-04-19Uses new FactoryGirl syntax in specs. Refs #13Alban Peignier
2012-04-17Fixes all specs. Refs #6Alban Peignier
2012-03-11Add validations. Fixes specsAlban Peignier
2012-02-15Add line to the modelLuc Donnet
2012-02-13Add referential model and gem apartmentLuc Donnet