Skip to content

Instantly share code, notes, and snippets.

@domagude
Last active November 13, 2017 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domagude/9b5f0986b2ffcaa3f5c2c578be0d5fbf to your computer and use it in GitHub Desktop.
Save domagude/9b5f0986b2ffcaa3f5c2c578be0d5fbf to your computer and use it in GitHub Desktop.
...
context 'Scopes' do
it 'gets a conversation between users' do
user1 = create(:user)
user2 = create(:user)
create(:private_conversation, recipient_id: user1.id, sender_id: user2.id)
conversation = Private::Conversation.between_users(user1.id, user2.id)
expect(conversation.count).to eq 1
end
end
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment