travis-api/spec/unit/endpoint/repos_spec.rb
2014-08-19 10:45:55 +02:00

17 lines
409 B
Ruby

require 'spec_helper'
describe Travis::Api::App::Endpoint::Repos do
before do
described_class.get('/spec/match/:id') { "id" }
described_class.get('/spec/match/:name') { "name" }
end
it 'matches id with digits' do
get('/repos/spec/match/123').body.should be == "id"
end
it 'does not match id with non-digits' do
get('/repos/spec/match/f123').body.should be == "name"
end
end