From c86586fc161b3611fb3e34e0d200c93afece7f08 Mon Sep 17 00:00:00 2001 From: Rob H Date: Thu, 24 Apr 2014 13:57:56 +1000 Subject: [PATCH] Remove collection date from admin enterprises index --- app/views/admin/enterprises/index.html.erb | 3 -- spec/features/admin/enterprises_spec.rb | 35 ---------------------- 2 files changed, 38 deletions(-) diff --git a/app/views/admin/enterprises/index.html.erb b/app/views/admin/enterprises/index.html.erb index 3fd36a6496..7ff2d597bb 100644 --- a/app/views/admin/enterprises/index.html.erb +++ b/app/views/admin/enterprises/index.html.erb @@ -14,7 +14,6 @@ - @@ -23,7 +22,6 @@ Name Role - Next Collection Date/Time Description @@ -34,7 +32,6 @@ <%= link_to enterprise.name, main_app.admin_enterprise_path(enterprise) %> <%= 'PP ' if enterprise.is_primary_producer %><%= 'D' if enterprise.is_distributor %> - <%= enterprise_form.text_field :next_collection_at %> <%= enterprise.description %> diff --git a/spec/features/admin/enterprises_spec.rb b/spec/features/admin/enterprises_spec.rb index 88c6dc8cb4..965ebc3828 100644 --- a/spec/features/admin/enterprises_spec.rb +++ b/spec/features/admin/enterprises_spec.rb @@ -127,26 +127,6 @@ feature %q{ page.should have_selector '#listing_enterprises a', text: 'Eaterprises' end - - scenario "updating many distributor next collection times at once" do - # Given three distributors - 3.times { create(:distributor_enterprise) } - - # When I go to the enterprises page - login_to_admin_section - click_link 'Enterprises' - - # And I fill in some new collection times and save them - fill_in 'enterprise_set_collection_attributes_0_next_collection_at', :with => 'One' - fill_in 'enterprise_set_collection_attributes_1_next_collection_at', :with => 'Two' - fill_in 'enterprise_set_collection_attributes_2_next_collection_at', :with => 'Three' - click_button 'Update' - - # Then my times should have been saved - flash_message.should == 'Distributor collection times updated.' - Enterprise.is_distributor.map { |d| d.next_collection_at }.sort.should == %w(One Two Three).sort - end - context 'as an Enterprise user' do let(:supplier1) { create(:supplier_enterprise, name: 'First Supplier') } let(:supplier2) { create(:supplier_enterprise, name: 'Another Supplier') } @@ -203,21 +183,6 @@ feature %q{ page.should have_selector '#listing_enterprises a', text: 'Eaterprises' end - scenario "can bulk edit enterprise collection dates/times for enterprises I have permission to" do - click_link 'Enterprises' - - fill_in 'enterprise_set_collection_attributes_0_next_collection_at', :with => 'One' - fill_in 'enterprise_set_collection_attributes_1_next_collection_at', :with => 'Two' - click_button 'Update' - - flash_message.should == 'Distributor collection times updated.' - - supplier1.reload.next_collection_at.should == 'One' - distributor1.reload.next_collection_at.should == 'Two' - supplier2.reload.next_collection_at.should be_nil - distributor2.reload.next_collection_at.should be_nil - end - scenario "Editing images for an enterprise" do click_link 'Enterprises' first(".edit").click