summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-25 17:10:25 +0100
committerRémy Coutable <remy@rymai.me>2017-04-14 15:20:55 +0200
commit3cb84e06b7a118fb46b4e1e0d4885026c9d4a4d1 (patch)
treeef622687724fd429f6f7fb02a19a022550bf8608 /spec/controllers
parent2951a8543ef97ceb1bcaca5f5140d822729c950b (diff)
downloadgitlab-ce-3cb84e06b7a118fb46b4e1e0d4885026c9d4a4d1.tar.gz
Remove user activities table and use redis instead of PG for recording activities
Refactored specs and added a post deployment migration to remove the activity users table.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/sessions_controller_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index 3459f30ef42..d817099394a 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -16,7 +16,9 @@ describe SessionsController do
end
end
- context 'when using valid password' do
+ context 'when using valid password', :redis do
+ include UserActivitiesHelpers
+
let(:user) { create(:user) }
it 'authenticates user correctly' do
@@ -41,7 +43,7 @@ describe SessionsController do
it 'updates the user activity' do
expect do
post(:create, user: { login: user.username, password: user.password })
- end.to change { user.reload.last_activity_at }.from(nil)
+ end.to change { user_score }.from(0)
end
end
end