tests: fix authentication in controller tests.

Fix controller tests to login for real instead of faking it.
This commit is contained in:
evazion
2019-08-24 22:55:35 -05:00
parent a9b0362fc7
commit 7c1552061b
3 changed files with 4 additions and 13 deletions

View File

@@ -98,10 +98,8 @@ class ActionDispatch::IntegrationTest
include TestHelpers
def method_authenticated(method_name, url, user, options)
Thread.current[:test_user_id] = user.id
post session_path, params: { name: user.name, password: user.password }
self.send(method_name, url, options)
ensure
Thread.current[:test_user_id] = nil
end
def get_auth(url, user, options = {})