Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Oct 13, 2019
1 parent cab8903 commit 077c49a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/factories/repository_mirror.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions spec/models/gitolite_public_key_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -236,15 +236,15 @@ 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
expect(GitolitePublicKey.user_key.length).to be == 2
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
Expand Down

0 comments on commit 077c49a

Please sign in to comment.