Skip to content

Instantly share code, notes, and snippets.

@daveworth
Created November 2, 2011 15:22
Show Gist options
  • Save daveworth/1333911 to your computer and use it in GitHub Desktop.
Save daveworth/1333911 to your computer and use it in GitHub Desktop.
it "creates a new ContactImport based on type" do
["vcard", "csv", "mailchimp"].each do |import_format|
import_class = ContactImport.import_mapping[import_format]
post :create, :contact_import => {:import_format => import_format}
assigns(:contact_import).should_not be_nil
assigns(:contact_import).should be_a_kind_of(import_class)
response.should redirect_to :edit_contact_import
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment