Created
October 8, 2014 00:30
-
-
Save stevemcquaid/b6d1d2d3eadebe5cd8fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rails_helper" | |
RSpec.describe Invitation do | |
context "with a new object" do | |
it "should create a new instance given a valid attribute" do | |
invitation = Invitation.create!( | |
:sender_id => 1, | |
:recipient_email => "[email protected]", | |
:token => "knjg1h2uye47fuygdwbfhshijdsap90afs9u8y7", | |
:sent_at => Time.now | |
) | |
expect(invitation).to be_valid | |
end | |
end | |
end | |
#### OUTPUT ##### | |
# 20) Invitation with a new object should create a new instance given a valid attribute | |
# Failure/Error: invitation = Invitation.create!( | |
# ActiveRecord::RecordInvalid: | |
# Validation failed: Recipient email can't be blank | |
# # ./spec/models/invitation_spec.rb:6:in `block (3 levels) in <top (required)>' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment