diff options
author | James Lopez <james@jameslopez.es> | 2017-07-06 16:59:40 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-07-07 10:38:57 +0200 |
commit | b08df253ef16d635883451aafeb71b4a6f4ccd09 (patch) | |
tree | cac2529bde00206b7ab19fa9092da16cd25d5d37 /spec/finders | |
parent | d206bb3e608885a91f97a7c35a8cd00c69aa6e54 (diff) | |
download | gitlab-ce-b08df253ef16d635883451aafeb71b4a6f4ccd09.tar.gz |
add finder and users API spec
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/users_finder_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/finders/users_finder_spec.rb b/spec/finders/users_finder_spec.rb index 780b309b45e..a2e5081b8d3 100644 --- a/spec/finders/users_finder_spec.rb +++ b/spec/finders/users_finder_spec.rb @@ -45,6 +45,12 @@ describe UsersFinder do expect(users).to contain_exactly(user, user1, user2, omniauth_user) end + + it 'filters by created_at' do + users = described_class.new(user, created_after: 2.days.ago, created_before: Time.now + 2.days).execute + + expect(users.count).to eq(4) + end end context 'with an admin user' do |