aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views
AgeCommit message (Collapse)Author
2017-11-28Remove page title test on views specXinhui
2017-11-28Refactoring move render pageheader into layoutXinhui
2017-11-14Remove rule parameter set controller, views, helperXinhui
Refs #4516
2017-10-02Fix specs for new tranport mode listcedricnjanga
2017-07-12stop_areas/show.html.erb_spec.rb: Decorate stop areaTeddy Wing
In order to get the `#action_links` method to be found by the new table builder, decorate the stop area. Refs #3479
2017-07-12routes/show.html.erb_spec.rb: Update for new table builder helperTeddy Wing
Need to decorate the stop points collection in order to be able to call `#action_links` on the objects therein. Added a stub for `pundit_user` to get around `TableBuilderHelper#table_builder_2` having a dependency on `ApplicationController#pundit_user`. Don't like this stub at all. Should be doing this in a better way. Refs #3479
2017-07-12networks/show.html.erb_spec.rb: Decorate test networkTeddy Wing
In order to get the view to render correctly and not fail on the `network.action_links` call, decorate the network used in these tests. Refs #3479
2017-07-11coherent spec file; no require (as in .rspec) and explicit RSpec.describeRobert
2017-07-11Refs #2646: fix route view testjpl
2017-06-19time_tables/show.html.erb_spec.rb: Fix specs from `TimeTableDecorator`Teddy Wing
Was getting these failures after switching the controller over to use a decorated `@time_table`: Failures: 1) /time_tables/show should render h2 with the time_table comment Failure/Error: - @time_table.action_links.each do |link| ActionView::Template::Error: undefined method `action_links' for #<Chouette::TimeTable:0x007fc8cefb8260> # ./app/views/time_tables/show.html.slim:13:in `block in _app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' # ./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/time_tables/show.html.slim:4:in `_app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' # ./spec/views/time_tables/show.html.erb_spec.rb:15:in `block (2 levels) in <top (required)>' # -e:1:in `<main>' # ------------------ # --- Caused by: --- # NoMethodError: # undefined method `action_links' for #<Chouette::TimeTable:0x007fc8cefb8260> # ./app/views/time_tables/show.html.slim:13:in `block in _app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' 2) /time_tables/show should render a link to edit the time_table Failure/Error: - @time_table.action_links.each do |link| ActionView::Template::Error: undefined method `action_links' for #<Chouette::TimeTable:0x007fc8cb65b148> # ./app/views/time_tables/show.html.slim:13:in `block in _app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' # ./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/time_tables/show.html.slim:4:in `_app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' # ./spec/views/time_tables/show.html.erb_spec.rb:20:in `block (2 levels) in <top (required)>' # -e:1:in `<main>' # ------------------ # --- Caused by: --- # NoMethodError: # undefined method `action_links' for #<Chouette::TimeTable:0x007fc8cb65b148> # ./app/views/time_tables/show.html.slim:13:in `block in _app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' 3) /time_tables/show should render a link to remove the time_table Failure/Error: - @time_table.action_links.each do |link| ActionView::Template::Error: undefined method `action_links' for #<Chouette::TimeTable:0x007fc8cd251820> # ./app/views/time_tables/show.html.slim:13:in `block in _app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' # ./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/time_tables/show.html.slim:4:in `_app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' # ./spec/views/time_tables/show.html.erb_spec.rb:25:in `block (2 levels) in <top (required)>' # -e:1:in `<main>' # ------------------ # --- Caused by: --- # NoMethodError: # undefined method `action_links' for #<Chouette::TimeTable:0x007fc8cd251820> # ./app/views/time_tables/show.html.slim:13:in `block in _app_views_time_tables_show_html_slim__2702796193816469913_70250218141540' Finished in 2.44 seconds (files took 0.82818 seconds to load) 3 examples, 3 failures Failed examples: rspec ./spec/views/time_tables/show.html.erb_spec.rb:14 # /time_tables/show should render h2 with the time_table comment rspec ./spec/views/time_tables/show.html.erb_spec.rb:19 # /time_tables/show should render a link to edit the time_table rspec ./spec/views/time_tables/show.html.erb_spec.rb:24 # /time_tables/show should render a link to remove the time_table To match the controller, we need to decorate the `time_table` objects used in these tests as well, because the view code has changed. Decoration is necessary to give us the `#action_links` method that we use to render the header links on the page. Refs #3479
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-06-16Add auto assign of slug and prefix for referential#createXinhui
Refs #3657
2017-04-25Refs #3183 #3185: starting init for create/duplicate, adding actionType to ↵jpl
state (fix tests)
2017-04-24Refs #2893: remove (again) rails form in tt#edit (managed by reactux)jpl
2017-04-11Deprecation Warnings removed; Seeds corrected, Refs: #2070RobertDober
2017-04-10Refs #2909: Fix tests, updating table builderjpl
2017-04-06Refs #2890: updating time_tables#show (calendars helper refacto in progress)jpl
2017-04-04Refs #2892: starting integration update on timetables#editjpl
2017-02-23Tmp disabling routes views testsjpl
2017-02-22Refs #2629: updating route stop_area reactux subform (first pass)jpl
2017-02-21Refs #2629: updating routes#showjpl
2017-02-17Refs #2609: upd in progress for stop_areas#showjpl
2017-02-17fix testsjpl
2017-02-08Refs #2482: fix testsjpl
2017-02-07Refs #2476 : Disable modification and deletion of resources from another ↵Vlatka Pavisic
referential; in progress
2017-01-09Refs #2347 : Fix view specVlatka Pavisic
2016-11-29Refs #2019: updating stop_areas with table builderjpl
2016-11-29Refs #2019: updating lines with table builderjpl
2016-11-29Refs #2019: updating networks with table builderjpl
2016-11-28Fix spec - policy disabled linkXinhui
2016-11-28Refs #2018 : Rm links to edit ReferentialLinevlatka pavisic
2016-11-21Refs #2019: fix tests on networks...jpl
2016-11-21Fixes /organisations/show spec. Refs #2007Alban Peignier
2016-11-18Refs #1974 : Refactor Line transport modevlatka pavisic
2016-11-14Refs #1936 : transport modesvlatka pavisic
2016-10-18update tablebuilder with path new helpersjpl
2016-10-14updating table builder on companiesjpl
2016-10-11Disable codifline GroupOfLine SyncXinhui
Refs #1794
2016-10-10Rename model OfferWorkbench to WorkbenchXinhui
Refs #1783
2016-10-07adding link builder to table builderjpl
2016-09-09associate networks to line referentialEdouard Maffert
2016-09-06associate companies controller to line_referential and fix specsEdouard Maffert
2016-08-03Refs #1295: convert erb to slim (referentials) + fix testsjpl
2016-05-15Associate LineReferential to Referential. Create ReferentialLines to manage ↵Alban Peignier
lines in Referential. Refs #826
2016-05-13Refactor controllers to manage StopAreas in StopAreaReferential. Refs #821Alban Peignier
2016-05-13Merge branch 'lines_lines_referentials_association'Alban Peignier
2016-05-13Refactor models and controllers to manage Lines in LineReferential. Refs #825Alban Peignier
2016-05-12add offer workbench model #827Edouard Maffert
2015-11-13Fix timeband views specBruno Perles
2015-11-03Update IHM for vehicle journey frequencyBruno Perles