Add subdomain & first endpoint
This commit is contained in:
parent
478e84f2b9
commit
ba29517a26
@ -7,13 +7,13 @@ describe ApiConstraints do
|
|||||||
describe "matches?" do
|
describe "matches?" do
|
||||||
|
|
||||||
it "returns true when the version matches the 'Accept' header" do
|
it "returns true when the version matches the 'Accept' header" do
|
||||||
request = double(host: 'api.nebapi.dev',
|
request = double(host: 'api.nebapi.local',
|
||||||
headers: {"Accept" => "application/vnd.nebapi.v1"})
|
headers: {"Accept" => "application/vnd.nebapi.v1"})
|
||||||
expect(api_constraints_v1.matches?(request)).to eq(true)
|
expect(api_constraints_v1.matches?(request)).to eq(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the default version when 'default' option is specified" do
|
it "returns the default version when 'default' option is specified" do
|
||||||
request = double(host: 'api.nebapi.dev')
|
request = double(host: 'api.nebapi.local')
|
||||||
expect(api_constraints_v2.matches?(request)).to eq(true)
|
expect(api_constraints_v2.matches?(request)).to eq(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user