Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Commit

Permalink
Merge pull request #40 from alphagov/clean-contact-feature
Browse files Browse the repository at this point in the history
remove old contacts.feature
  • Loading branch information
dhwthompson committed Nov 21, 2012
2 parents 55b8080 + 4866b88 commit 50177ca
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 76 deletions.
22 changes: 0 additions & 22 deletions features/contacts.feature

This file was deleted.

8 changes: 0 additions & 8 deletions features/step_definitions/api_steps.rb
Expand Up @@ -15,14 +15,6 @@
check_artefact_does_not_have_related_artefact_in_api @artefact, @unrelated_artefact
end

Then /^the API should say that the artefact has the contact$/ do
check_artefact_has_contact_in_api @artefact, @contact
end

Then /^the API should say that the artefact does not have the contact$/ do
check_artefact_does_not_have_contact_in_api @artefact, @contact
end

Then /^the API should say that the artefact has the section$/ do
check_artefact_has_tag_in_api @artefact, @section.tag_id
end
Expand Down
16 changes: 0 additions & 16 deletions features/step_definitions/artefact_steps.rb
Expand Up @@ -106,16 +106,6 @@
@sections = create_sections
end

When /^I add the contact to the artefact$/ do
visit edit_artefact_path(@artefact)
select_contact @contact
submit_artefact_form
end

Given /^the artefact has the contact$/ do
add_contact @artefact, @contact
end

Given /^the artefact has the section$/ do
add_section @artefact, @section
end
Expand All @@ -126,12 +116,6 @@
end
end

When /^I remove the contact from the artefact$/ do
visit edit_artefact_path(@artefact)
unselect_contact @contact
submit_artefact_form
end

When /^I add the section to the artefact$/ do
visit edit_artefact_path(@artefact)
select_section @section
Expand Down
3 changes: 0 additions & 3 deletions features/step_definitions/contact_steps.rb

This file was deleted.

12 changes: 0 additions & 12 deletions features/support/api.rb
Expand Up @@ -11,10 +11,6 @@ def tag_ids_from_api(artefact)
artefact_data_from_api(artefact)[:tag_ids]
end

def contact_id_from_api(artefact)
artefact_data_from_api(artefact)[:contact].try(:[], :id)
end

def check_artefact_exists_in_api(artefact_or_slug)
if artefact_or_slug.is_a?(Hash)
slug = artefact_or_slug[:slug]
Expand Down Expand Up @@ -42,14 +38,6 @@ def check_artefact_does_not_have_related_artefact_in_api(artefact, unrelated_art
refute_includes related_artefact_ids_from_api(artefact), unrelated_artefact.id.to_s
end

def check_artefact_has_contact_in_api(artefact, contact)
assert_equal contact_id_from_api(artefact), contact.id.to_s
end

def check_artefact_does_not_have_contact_in_api(artefact, contact)
assert_not_equal contact_id_from_api(artefact), contact.id.to_s
end

def check_artefact_has_tag_in_api(artefact, tag_id)
assert_includes tag_ids_from_api(artefact), tag_id
end
Expand Down
15 changes: 0 additions & 15 deletions features/support/contacts.rb

This file was deleted.

0 comments on commit 50177ca

Please sign in to comment.