diff --git a/test/functional/phases_controller_test.rb b/test/functional/phases_controller_test.rb index ed2cf5c..ca5b3b9 100644 --- a/test/functional/phases_controller_test.rb +++ b/test/functional/phases_controller_test.rb @@ -19,14 +19,14 @@ # # SHOULD BE: # -------------------------------------------------- -# phases GET /phases phases#index -# POST /phases phases#create -# phase GET /phase/[:id] phases#show -# PATCH /phase/[:id] phases#update -# PUT /phase/[:id] phases#update -# DELETE /phase/[:id] phases#destroy -# edit_phase GET /phase/[:id]/edit phases#edit -# new_phase GET /phase/new phases#new +# phases GET /templates/:template_id/phases phases#index +# POST /templates/:template_id/phases phases#create +# phase GET /templates/:template_id/phase/:id phases#show +# PATCH /templates/:template_id/phase/:id phases#update +# PUT /templates/:template_id/phase/:id phases#update +# DELETE /templates/:template_id/phase/:id phases#destroy +# edit_phase GET /templates/:template_id/phase/:id/edit phases#edit +# new_phase GET /templates/:template_id/phase/new phases#new # # CURRENT RESULTS OF `rake routes` # -------------------------------------------------- @@ -155,7 +155,7 @@ # Invalid object post admin_create_phase_path(@template.phases.first), {phase: params} assert_response :success - assert_equal _('Unable to save your changes.'), flash[:notice] + assert flash[:notice].starts_with?(_('Unable to save your changes.')) end # PUT /org/admin/templates/phases/:id/admin_update (admin_update_phase_path) @@ -183,7 +183,7 @@ # TODO: WHY are we passing 'edit' as a query param just use that route!? assert_redirected_to "#{admin_show_phase_url(@template.phases.first)}?edit=true" assert assigns(:phase) - assert_equal _('Unable to save your changes.'), flash[:notice] + assert flash[:notice].starts_with?(_('Unable to save your changes.')) end # DELETE /org/admin/templates/phases/:id/admin_destroy (admin_destroy_phase_path) diff --git a/test/functional/templates_controller_test.rb b/test/functional/templates_controller_test.rb index d75196f..6884d85 100644 --- a/test/functional/templates_controller_test.rb +++ b/test/functional/templates_controller_test.rb @@ -145,7 +145,7 @@ post admin_create_template_path(Template.last.id), {template: {title: nil, org_id: @user.org.id}} assert_response :success assert assigns(:template) - assert_equal _('Unable to save your changes.'), flash[:notice] + assert flash[:notice].starts_with?(_('Unable to save your changes.')) end # GET /org/admin/templates/:id/admin_update (admin_update_template_path) @@ -181,7 +181,7 @@ assert_response :redirect assert_redirected_to admin_template_template_url(Template.last.id) assert assigns(:template) - assert_equal _('Unable to save your changes.'), flash[:notice] + assert flash[:notice].starts_with?(_('Unable to save your changes.')) end end \ No newline at end of file