Skip to content

Instantly share code, notes, and snippets.

@luigi
Created August 12, 2008 14:06
Show Gist options
  • Save luigi/5045 to your computer and use it in GitHub Desktop.
Save luigi/5045 to your computer and use it in GitHub Desktop.
describe "Sending Membership Invites" do
before :each do
user = mock_model(User)
group = mock_model(Group, :user => user, :name => "What's up holmes?")
invitee = mock_model(User)
membership = mock_model(Membership, :user => invitee, :group => group)
@message = Message.create_for_membership_invitation(membership)
end
it "should successfully create a membership invite" do
@message.should be_valid
end
it "should have the correct subject" do
@message.subject.should eql("You have been invited to join the group 'What's up holmes?'")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment