Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-07-06 17:59:40 +0300
committerJames Lopez <james@jameslopez.es>2017-07-07 11:38:57 +0300
commitb08df253ef16d635883451aafeb71b4a6f4ccd09 (patch)
treecac2529bde00206b7ab19fa9092da16cd25d5d37 /spec/finders/users_finder_spec.rb
parentd206bb3e608885a91f97a7c35a8cd00c69aa6e54 (diff)
add finder and users API spec
Diffstat (limited to 'spec/finders/users_finder_spec.rb')
-rw-r--r--spec/finders/users_finder_spec.rb6
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