DEV: Add order to avoid randomly failing test.
This commit is contained in:
parent
5ae4cbcf88
commit
aa60936115
|
@ -1130,9 +1130,7 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]
|
MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]
|
||||||
|
|
||||||
render json: {
|
render json: success_json
|
||||||
success: true
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -3265,13 +3265,14 @@ describe UsersController do
|
||||||
|
|
||||||
context 'while logged in' do
|
context 'while logged in' do
|
||||||
before do
|
before do
|
||||||
sign_in(user)
|
2.times { sign_in(user) }
|
||||||
sign_in(user)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'logs user out' do
|
it 'logs user out' do
|
||||||
ids = user.user_auth_tokens.map { |token| token.id }
|
ids = user.user_auth_tokens.order(:created_at).pluck(:id)
|
||||||
post "/u/#{user.username}/preferences/revoke-auth-token.json", params: { token_id: ids[0] }
|
|
||||||
|
post "/u/#{user.username}/preferences/revoke-auth-token.json",
|
||||||
|
params: { token_id: ids[0] }
|
||||||
|
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue