diff options
Diffstat (limited to 'spec/views')
| -rw-r--r-- | spec/views/connection_links/index.html.erb_spec.rb | 8 | ||||
| -rw-r--r-- | spec/views/connection_links/show.html.erb_spec.rb | 23 | 
2 files changed, 15 insertions, 16 deletions
| diff --git a/spec/views/connection_links/index.html.erb_spec.rb b/spec/views/connection_links/index.html.erb_spec.rb index a01380094..1f133e31e 100644 --- a/spec/views/connection_links/index.html.erb_spec.rb +++ b/spec/views/connection_links/index.html.erb_spec.rb @@ -17,9 +17,11 @@ describe "/connection_links/index", :type => :view do      end    end -  it "should render a link to create a new group" do -    render -    expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{new_referential_connection_link_path(referential)}']") +  with_permission "connection_links.create" do +    it "should render a link to create a new group" do +      render +      expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{new_referential_connection_link_path(referential)}']") +    end    end  end diff --git a/spec/views/connection_links/show.html.erb_spec.rb b/spec/views/connection_links/show.html.erb_spec.rb index c04a4f3f1..afe94fc6c 100644 --- a/spec/views/connection_links/show.html.erb_spec.rb +++ b/spec/views/connection_links/show.html.erb_spec.rb @@ -15,21 +15,18 @@ describe "/connection_links/show", :type => :view do      expect(rendered).to have_selector("h2", :text => Regexp.new(connection_link.name))    end -#  it "should display a map with class 'connection_link'" do -#    pending ": map not yet implemented" -#     render -#     expect(rendered).to have_selector("#map", :class => 'connection_link') -#  end - -  it "should render a link to edit the connection_link" do -    render -    expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.edit_referential_connection_link_path(referential, connection_link)}']") +  with_permission "connection_links.update" do +    it "should render a link to edit the connection_link" do +      render +      expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.edit_referential_connection_link_path(referential, connection_link)}']") +    end    end -  it "should render a link to remove the connection_link" do -    render -    expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.referential_connection_link_path(referential, connection_link)}'][class='remove']") +  with_permission "connection_links.destroy" do +    it "should render a link to remove the connection_link" do +      render +      expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.referential_connection_link_path(referential, connection_link)}'][class='remove']") +    end    end  end - | 
