diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2018-12-17 09:17:39 +0300 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-12-17 09:17:39 +0300 |
commit | 8ce86bf9a06dd656479ce2cd50757c78c5b01a9d (patch) | |
tree | 3719934562fe0c68dba73f0ba563bd3807e3819b /spec/requests | |
parent | 8b4602041cf2c4a8738a4796d78720017249249f (diff) |
Revert "Revert "LfsToken uses JSONWebToken::HMACToken by default""
This reverts commit 00acef434031b5dc0bf39576a9e83802c7806842.
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/internal_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 2ebcb787d06..1575de78bb4 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -156,9 +156,8 @@ describe API::Internal do expect(response).to have_gitlab_http_status(200) expect(json_response['username']).to eq(user.username) - expect(json_response['lfs_token']).to eq(Gitlab::LfsToken.new(key).token) - expect(json_response['repository_http_path']).to eq(project.http_url_to_repo) + expect(Gitlab::LfsToken.new(key).token_valid?(json_response['lfs_token'])).to be_truthy end it 'returns the correct information about the user' do @@ -166,9 +165,8 @@ describe API::Internal do expect(response).to have_gitlab_http_status(200) expect(json_response['username']).to eq(user.username) - expect(json_response['lfs_token']).to eq(Gitlab::LfsToken.new(user).token) - expect(json_response['repository_http_path']).to eq(project.http_url_to_repo) + expect(Gitlab::LfsToken.new(user).token_valid?(json_response['lfs_token'])).to be_truthy end it 'returns a 404 when no key or user is provided' do @@ -198,8 +196,8 @@ describe API::Internal do expect(response).to have_gitlab_http_status(200) expect(json_response['username']).to eq("lfs+deploy-key-#{key.id}") - expect(json_response['lfs_token']).to eq(Gitlab::LfsToken.new(key).token) expect(json_response['repository_http_path']).to eq(project.http_url_to_repo) + expect(Gitlab::LfsToken.new(key).token_valid?(json_response['lfs_token'])).to be_truthy end end end |