diff options
| author | Teddy Wing | 2017-06-19 18:47:32 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-19 18:47:32 +0200 |
| commit | 150e71e3110292c0c27fe35a63e8a2d0e26c5259 (patch) | |
| tree | 7c3e68b8206f6780667fb3bad02bfc6614a7762a | |
| parent | 3343920fe8df5378f7bced238b03860e249ac1cf (diff) | |
| download | chouette-core-150e71e3110292c0c27fe35a63e8a2d0e26c5259.tar.bz2 | |
referentials_permissions_spec.rb: Fix failure from `#destroy_link_content`
Now, destroy ("Supprimer") buttons in the header get rendered without a
`<span>` tag surrounding the text inside the button. This is because I
consolidated the HTML structure of the delete buttons inside table gear
menus and the header.
The ones in the gear menus had no span, and these in the header do.
In both places, we're now using `LinksHelper#destroy_link_content` to
generate the contents of the button, making the contents uniform in both
contexts.
This means, however, that the markup is not the same for header buttons,
which now have their inner `<span>` tag removed. Update the test to
reflect this.
Also, the styling breaks when I updated the markup, but Jean-Paul
offered to fix that.
Refs #3479
| -rw-r--r-- | spec/features/referentials_permissions_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/features/referentials_permissions_spec.rb b/spec/features/referentials_permissions_spec.rb index 0216eeeb0..c37dff5b9 100644 --- a/spec/features/referentials_permissions_spec.rb +++ b/spec/features/referentials_permissions_spec.rb @@ -31,7 +31,7 @@ describe "Referentials", :type => :feature do end it 'shows the delete button' do expected_href = referential_path(referential) - expect( page ).to have_css(%{a[href=#{expected_href.inspect}] span}, text: destroy_link_text) + expect( page ).to have_css(%{a[href=#{expected_href.inspect}]}, text: destroy_link_text) end end |
