diff options
| author | Teddy Wing | 2017-07-12 11:32:46 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-07-12 11:32:46 +0200 | 
| commit | e49dab499770d36a24c554019225092059a8cfa2 (patch) | |
| tree | 7133eb73f7fa8f1c18c40c7109443ad8886eef6d /spec | |
| parent | ea485077b68b772fbacd809c4de8c38183098e28 (diff) | |
| download | chouette-core-e49dab499770d36a24c554019225092059a8cfa2.tar.bz2 | |
networks/show.html.erb_spec.rb: Decorate test network
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
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/views/networks/show.html.erb_spec.rb | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/views/networks/show.html.erb_spec.rb b/spec/views/networks/show.html.erb_spec.rb index e613ea948..72605fb46 100644 --- a/spec/views/networks/show.html.erb_spec.rb +++ b/spec/views/networks/show.html.erb_spec.rb @@ -2,7 +2,12 @@ require 'spec_helper'  describe "/networks/show", :type => :view do -  let!(:network) { assign(:network, create(:network)) } +  let!(:network) do +    network = create(:network) +    assign(:network, network.decorate(context: { +      line_referential: network.line_referential +    })) +  end    let!(:map) { assign(:map, double(:to_html => '<div id="map"/>'.html_safe)) }    let!(:line_referential) { assign :line_referential, network.line_referential }  | 
