diff options
| author | Xinhui | 2016-05-10 15:34:30 +0200 |
|---|---|---|
| committer | Xinhui | 2016-05-10 15:34:30 +0200 |
| commit | 848e6de7d25c41ee3b6cfb77740f0ce2f9eb0dd3 (patch) | |
| tree | 1470c2c49fcb0cb77465cdc28f551bb7639c9863 | |
| parent | 9c052ed7bc763ace5ef5a61d4408bfc5468f8d5a (diff) | |
| download | chouette-core-848e6de7d25c41ee3b6cfb77740f0ce2f9eb0dd3.tar.bz2 | |
Remove referential create link / index list
Refs #823
| -rw-r--r-- | app/views/referentials/index.html.erb | 16 | ||||
| -rw-r--r-- | spec/features/referentials_spec.rb | 36 |
2 files changed, 30 insertions, 22 deletions
diff --git a/app/views/referentials/index.html.erb b/app/views/referentials/index.html.erb index 7f1604b7c..51088dbd3 100644 --- a/app/views/referentials/index.html.erb +++ b/app/views/referentials/index.html.erb @@ -1,12 +1,18 @@ -<%= title_tag Referential.model_name.human(:count => 2) %> -<div class="referentials paginated_content"> - <%= paginated_content @referentials %> -</div> +<!-- FIXME #823 --> +<% if false %> + <%= title_tag Referential.model_name.human(:count => 2) %> + <div class="referentials paginated_content"> + <%= paginated_content @referentials %> + </div> +<% end %> <% content_for :sidebar do %> <ul class="actions"> - <li><%= link_to t('referentials.actions.new'), new_referential_path, :class => "add" %></li> + <!-- FIXME #823 --> + <% if false %> + <li><%= link_to t('referentials.actions.new'), new_referential_path, :class => "add" %></li> + <% end %> </ul> <ul> <!-- FIXME #820 --> diff --git a/spec/features/referentials_spec.rb b/spec/features/referentials_spec.rb index 1bce09da7..d04c53e18 100644 --- a/spec/features/referentials_spec.rb +++ b/spec/features/referentials_spec.rb @@ -6,33 +6,35 @@ describe "Referentials", :type => :feature do describe "index" do - it "should support no referential" do - visit referentials_path - expect(page).to have_content("Espaces de Données") - end + # FIXME #823 + # it "should support no referential" do + # visit referentials_path + # expect(page).to have_content("Espaces de Données") + # end context "when several referentials exist" do def retrieve_referential_by_slug( slug) - @user.organisation.referentials.find_by_slug(slug) || + @user.organisation.referentials.find_by_slug(slug) || create(:referential, :slug => slug, :name => slug, :organisation => @user.organisation) end - + let!(:referentials) { [ retrieve_referential_by_slug("aa"), - retrieve_referential_by_slug("bb")] } + retrieve_referential_by_slug("bb")] } + + # FIXME #823 + # it "should show n referentials" do + # visit referentials_path + # expect(page).to have_content(referentials.first.name) + # expect(page).to have_content(referentials.last.name) + # end - it "should show n referentials" do - visit referentials_path - expect(page).to have_content(referentials.first.name) - expect(page).to have_content(referentials.last.name) - end - end end - + describe "create" do - + it "should" do visit new_referential_path fill_in "Nom", :with => "Test" @@ -48,7 +50,7 @@ describe "Referentials", :type => :feature do end describe "destroy" do - let(:referential) { create(:referential, :organisation => @user.organisation) } + let(:referential) { create(:referential, :organisation => @user.organisation) } it "should remove referential" do visit referential_path(referential) @@ -57,5 +59,5 @@ describe "Referentials", :type => :feature do end end - + end |
