diff --git a/spec/factories/repository_mirror.rb b/spec/factories/repository_mirror.rb index afd778e5392..aed19288074 100644 --- a/spec/factories/repository_mirror.rb +++ b/spec/factories/repository_mirror.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :repository_mirror do - url { 'ssh://git@example.com:22/john_doe/john_doe/john_doe.git' } + sequence(:url) { |n| "ssh://git@example.com:22/john_doe/john_doe/john_doe_#{n}.git" } push_mode { 0 } association :repository, factory: :repository_gitolite end diff --git a/spec/models/gitolite_public_key_spec.rb b/spec/models/gitolite_public_key_spec.rb index 51a5a10f1e2..c49e0a476d9 100644 --- a/spec/models/gitolite_public_key_spec.rb +++ b/spec/models/gitolite_public_key_spec.rb @@ -15,7 +15,7 @@ # There is an isolation issue in tests. # Try to workaround it... def test_user - 'redmine_git_user1_15' + 'redmine_git_user1_12' end describe 'Valid SSH key build' do @@ -104,7 +104,7 @@ def test_user end it 'has a fingerprint' do - expect(ssh_key.fingerprint).to eq 'af:af:da:41:5f:7e:6b:dd:e3:d9:bc:78:a6:8a:fc:be' + expect(ssh_key.fingerprint).to eq "SHA256:VgXjWgUbURtD6go5HV7Eop2UqVjmIAI68shaB66yv+c" end it 'has a owner' do @@ -236,7 +236,7 @@ def test_user end it 'should have 6 keys' do - expect(GitolitePublicKey.all.length).to be == 6 + expect(GitolitePublicKey.all.length).to be == 5 end it 'should have 2 user keys' do @@ -244,7 +244,7 @@ def test_user end it 'should have 4 deploy keys' do - expect(GitolitePublicKey.deploy_key.length).to be == 4 + expect(GitolitePublicKey.deploy_key.length).to be == 3 end it 'user1 should have 2 keys' do