diff --git a/features/reading/delete.feature b/features/reading/delete.feature index 39661cd..26366ee 100644 --- a/features/reading/delete.feature +++ b/features/reading/delete.feature @@ -10,7 +10,7 @@ Feature: Reading Deletion And I own a sample reading group And I have a sample reading within the sample reading group When I visit the Sample Reading Group page - And I click the Destroy link + And I choose the destroy reading link Then I should see "There are no Readings yet!" @kalibro_configuration_restart @@ -20,4 +20,4 @@ Feature: Reading Deletion And I have a sample reading group And I have a sample reading within the sample reading group When I visit the Sample Reading Group page - Then I should not see "Destroy" \ No newline at end of file + Then I should not see "Destroy" diff --git a/features/step_definitions/reading_steps.rb b/features/step_definitions/reading_steps.rb index cade97f..931d940 100644 --- a/features/step_definitions/reading_steps.rb +++ b/features/step_definitions/reading_steps.rb @@ -29,3 +29,8 @@ end Then(/^I should see a color picker Canvas$/) do page.find('div.colorpicker') end + +When(/^I choose the destroy reading link$/) do + url = "/reading_groups/#{@reading_group.id}/readings/#{@reading.id}" + find("//a[@href='#{url}']").click +end -- libgit2 0.21.2