style check

This commit is contained in:
Tanguy PATTE 2015-08-20 16:25:54 +02:00
parent d455cbbb07
commit 8ee596e152
7 changed files with 14 additions and 15 deletions

View file

@ -7,7 +7,7 @@ class CommentairesController < ApplicationController
@commentaire.save
if request.referer.include?'/recapitulatif'
if request.referer.include? '/recapitulatif'
redirect_to url_for({controller: :recapitulatif, action: :show, :dossier_id => params['dossier_id']})
else
redirect_to url_for({controller: 'admin/dossier', action: :show, :dossier_id => params['dossier_id']})

View file

@ -9,8 +9,7 @@ class RecapitulatifController < ApplicationController
@commentaires = @commentaires.all.decorate
@commentaire_email = @dossier.mail_contact
rescue => e
rescue
redirect_to url_for({controller: :start, action: :error_dossier})
end
end

View file

@ -2,7 +2,7 @@ require 'spec_helper'
RSpec.describe DemandesController, type: :controller do
let(:dossier) { create(:dossier, formulaire_id: '') }
let (:dossier_id) { dossier.id }
let(:dossier_id) { dossier.id }
describe "GET #show" do
it "returns http success" do

View file

@ -2,8 +2,8 @@ require 'spec_helper'
describe DescriptionController, type: :controller do
let(:dossier) { create(:dossier) }
let (:dossier_id) { dossier.id }
let (:bad_dossier_id) { Dossier.count + 10 }
let(:dossier_id) { dossier.id }
let(:bad_dossier_id) { Dossier.count + 10 }
describe "GET #show" do
it "returns http success" do

View file

@ -2,12 +2,12 @@ require 'spec_helper'
RSpec.describe DossiersController, type: :controller do
let(:dossier) { create(:dossier, :with_entreprise) }
let (:dossier_id) { dossier.id }
let (:siret_not_found) { 999999999999 }
let(:dossier_id) { dossier.id }
let(:siret_not_found) { 999999999999 }
let (:siren) { dossier.siren }
let (:siret) { dossier.siret }
let (:bad_siret){1}
let(:siren) { dossier.siren }
let(:siret) { dossier.siret }
let(:bad_siret){1}
describe 'GET #show' do
it "returns http success with dossier_id valid" do

View file

@ -3,7 +3,7 @@ FactoryGirl.define do
formulaire_id 12
trait :with_entreprise do
after(:build) do |dossier, evaluator|
after(:build) do |dossier, _evaluator|
etablissement = create(:etablissement)
entreprise = create(:entreprise, etablissement: etablissement)
dossier.entreprise = entreprise

View file

@ -2,7 +2,7 @@ require 'spec_helper'
feature 'Demandes#Show Page' do
let(:dossier) { create(:dossier)}
let (:dossier_id) { dossier.id }
let(:dossier_id) { dossier.id }
before do
visit "/dossiers/#{dossier_id}/demande"
@ -14,11 +14,11 @@ feature 'Demandes#Show Page' do
end
scenario 'la liste des demandes possibles est présente' do
expect(page).to have_selector ('select[id=formulaire][name=formulaire]');
expect(page).to have_selector('select[id=formulaire][name=formulaire]');
end
scenario 'le bouton "Etape suivante" est présent' do
expect(page).to have_selector ('#etape_suivante');
expect(page).to have_selector('#etape_suivante');
end
end
end