Skip to content

Commit

Permalink
Add Responder test for unique email address
Browse files Browse the repository at this point in the history
  • Loading branch information
nickh committed Nov 14, 2009
1 parent 8f5e2b2 commit af240fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/fixtures/responders.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--
6 changes: 6 additions & 0 deletions spec/models/responder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@
Responder.new(:email_address => 'after@no_dot').should_not be_valid
Responder.new(:email_address => 'valid@domain.sub').should be_valid
end

it "should ensure email addresses are unique" do
test_addr = 'foo@bar.org'
Responder.create(:email_address => test_addr)
Responder.new(:email_address => test_addr).should_not be_valid
end
end

0 comments on commit af240fe

Please sign in to comment.