Created
May 8, 2018 09:25
-
-
Save stevo/bd63e8198f37e8f8e74dd08ab0dc7d07 to your computer and use it in GitHub Desktop.
An opinionated guide to readable RSpec (part 2 of 2)
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
it 'returns users with member privileges only' do | |
member = create(:user, :with_member_privilege) | |
create(:user, :with_admin_privilege) | |
create(:user, :with_member_privilege, :with_admin_privilege) | |
result = MembersOnlyQuery.call | |
expect(result).to match([member]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment