Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 1629cfb

Browse files
committed
Create test to check if commit id is trimmed
1 parent 9a7d259 commit 1629cfb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

spec/codacy/client_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require "spec_helper"
2+
3+
describe Codacy::ClientAPI do
4+
describe 'create url' do
5+
it 'checks if the url is correct.' do
6+
codacy_base_api = 'https://api.codacy.com'
7+
8+
expected_commit_uuid = "9a7d25976a11f2a145f8fee7c4e4ad58b621d560"
9+
expected_url = Codacy::ClientAPI.create_url(codacy_base_api, expected_commit_uuid)
10+
11+
wrong_commit_uuid = "'9a7d25976a11f2a145f8fee7c4e4ad58b621d560'"
12+
fixed_url = Codacy::ClientAPI.create_url(codacy_base_api, wrong_commit_uuid)
13+
14+
expect(fixed_url).to eq expected_url
15+
end
16+
end
17+
end

0 commit comments

Comments
 (0)