Skip to content

Commit

Permalink
Add specs for other uri types.
Browse files Browse the repository at this point in the history
  • Loading branch information
djberg96 committed Nov 2, 2020
1 parent 1ff084b commit 874902f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/models/git_repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,20 @@
expect($log).to receive(:debug).with(/pinging 'example.com' to verify network connection/)
expect(repo.check_connection?).to eq(true)
end

it "handles ssh urls without issue" do
allow(repo).to receive(:url).and_return("ssh://[email protected]:443/manageiq.git")
allow(ext_ping).to receive(:ping?).and_return(true)
expect($log).to receive(:debug).with(/pinging 'example.com' to verify network connection/)
expect(repo.check_connection?).to eq(true)
end

it "handles file urls without issue" do
allow(repo).to receive(:url).and_return("file://example.com/server/manageiq.git")
allow(ext_ping).to receive(:ping?).and_return(true)
expect($log).to receive(:debug).with(/pinging 'example.com' to verify network connection/)
expect(repo.check_connection?).to eq(true)
end
end
end
end

0 comments on commit 874902f

Please sign in to comment.