diff options
| author | Zog | 2018-04-04 09:07:24 +0200 |
|---|---|---|
| committer | Johan Van Ryseghem | 2018-04-04 11:12:34 +0200 |
| commit | dc165132d3c9e5bd9a41f514a7f6f14d032ae2d8 (patch) | |
| tree | adbd3d23839ebec9644d567744e24be9e479c747 | |
| parent | 6d15b7ec25592dc34cd95c738ef0854fdd1b94d2 (diff) | |
| download | chouette-core-dc165132d3c9e5bd9a41f514a7f6f14d032ae2d8.tar.bz2 | |
Fix more specs
| -rw-r--r-- | spec/views/companies/edit.html.erb_spec.rb | 5 | ||||
| -rw-r--r-- | spec/views/companies/new.html.erb_spec.rb | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/spec/views/companies/edit.html.erb_spec.rb b/spec/views/companies/edit.html.erb_spec.rb index 8aaf705ab..c72d84c0b 100644 --- a/spec/views/companies/edit.html.erb_spec.rb +++ b/spec/views/companies/edit.html.erb_spec.rb @@ -5,7 +5,10 @@ describe "/companies/edit", :type => :view do let!(:company) { assign(:company, create(:company)) } let!(:companies) { Array.new(2) { create(:company) } } let!(:line_referential) { assign :line_referential, company.line_referential } - + before do + allow(view).to receive(:resource){ company } + allow(view).to receive(:current_referential){ first_referential } + end describe "form" do it "should render input for name" do render diff --git a/spec/views/companies/new.html.erb_spec.rb b/spec/views/companies/new.html.erb_spec.rb index ebb8c03c5..6c2163677 100644 --- a/spec/views/companies/new.html.erb_spec.rb +++ b/spec/views/companies/new.html.erb_spec.rb @@ -4,7 +4,10 @@ describe "/companies/new", :type => :view do let!(:company) { assign(:company, build(:company)) } let!(:line_referential) { assign :line_referential, company.line_referential } - + before do + allow(view).to receive(:resource){company} + allow(view).to receive(:current_referential){ first_referential } + end describe "form" do it "should render input for name" do |
