From cb68445efa273fd72da2b8f9ef8e1eebe35774e1 Mon Sep 17 00:00:00 2001 From: James Mason Date: Tue, 19 Aug 2014 08:49:40 -0700 Subject: [PATCH 1/2] Typo --- app/views/proposal/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/proposal/_form.html.haml b/app/views/proposal/_form.html.haml index 0b78cbdb..6c435da8 100644 --- a/app/views/proposal/_form.html.haml +++ b/app/views/proposal/_form.html.haml @@ -28,7 +28,7 @@ = render partial: 'shared/media_item', locals: { commercial_type: commercial.commercial_type, commercial_id: commercial.commercial_id } - if can? :update, commercial = link_to 'Edit', edit_conference_proposal_commercial_path(@conference.short_title, @event.id, commercial.id), class: 'btn btn-primary' - - if can? :destrooy, commercial + - if can? :destroy, commercial = link_to 'Delete', conference_proposal_commercial_path(@conference.short_title, @event.id, commercial.id), :method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger' - if can? :create, @event.commercials.new From 818fd96418bf81835415f977aa1e64c64d3c990e Mon Sep 17 00:00:00 2001 From: James Mason Date: Tue, 19 Aug 2014 08:49:51 -0700 Subject: [PATCH 2/2] Adding a network delay on subsequent action in proposal spec. Without this, I get consistent failures, and others experience intermmitent failures, on this spec. --- spec/features/proposal_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/features/proposal_spec.rb b/spec/features/proposal_spec.rb index 1f4aa796..e534b2ea 100644 --- a/spec/features/proposal_spec.rb +++ b/spec/features/proposal_spec.rb @@ -92,6 +92,7 @@ feature Event do # Delete a commercial click_link 'Commercials' click_link 'Delete' + page.driver.network_traffic expect(flash).to eq('Commercial was successfully destroyed.') expect(event.commercials.count).to eq(expected_count_commercial - 1)