diff options
| author | Teddy Wing | 2017-05-22 14:39:35 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-05-22 14:41:42 +0200 |
| commit | 7b498a92d79a0305b98418774b65cf9fcb1ce237 (patch) | |
| tree | 82614690439506fd42c99e8670ac802a8d21c091 | |
| parent | fc9ff386b1961949e2ba742ef226935ec3c389cd (diff) | |
| download | chouette-core-7b498a92d79a0305b98418774b65cf9fcb1ce237.tar.bz2 | |
vehicle_journeys/reducers/filters_spec: Fix CREATE_QUERY_STRING test
My change to add the `vehicle_journey_without_time_table` filter option
in c84330abb5f52d42e1aa7ec9e5db930d8e23163e broke this test because my
change modified the query string. Add in the new
`vehicle_journey_without_time_table` param to the expected query string.
Also rewrite the string as an array to make it a little easier to read.
| -rw-r--r-- | spec/javascripts/vehicle_journeys/reducers/filters_spec.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/javascripts/vehicle_journeys/reducers/filters_spec.js b/spec/javascripts/vehicle_journeys/reducers/filters_spec.js index e0e5460f7..0a6729c8b 100644 --- a/spec/javascripts/vehicle_journeys/reducers/filters_spec.js +++ b/spec/javascripts/vehicle_journeys/reducers/filters_spec.js @@ -146,7 +146,16 @@ describe('filters reducer', () => { }) it('should handle CREATE_QUERY_STRING', () => { - let strResult = "q%5Bjourney_pattern_id_eq%5D=undefined&q%5Bobjectid_cont%5D=undefined&q%5Btime_tables_id_eq%5D=undefined&q%5Bvehicle_journey_at_stops_departure_time_gteq%5D=11%3A11&q%5Bvehicle_journey_at_stops_departure_time_lteq%5D=22%3A22&q%5Bvehicle_journey_without_departure_time%5D=true" + let strResult = [ + "q%5Bjourney_pattern_id_eq%5D=undefined", + "&q%5Bobjectid_cont%5D=undefined", + "&q%5Btime_tables_id_eq%5D=undefined", + "&q%5Bvehicle_journey_at_stops_departure_time_gteq%5D=11%3A11", + "&q%5Bvehicle_journey_at_stops_departure_time_lteq%5D=22%3A22", + "&q%5Bvehicle_journey_without_departure_time%5D=true", + "&q%5Bvehicle_journey_without_time_table%5D=true" + ].join('') + expect( statusReducer(state, { type: 'CREATE_QUERY_STRING', |
