Update test spec to use "localhost" instead (#1300)

* update test spec to use localhost intead

* add new files
This commit is contained in:
William Cheng 2018-10-24 13:56:39 +08:00 committed by GitHub
parent 3d7a019524
commit 76aedca6b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -994,8 +994,8 @@ servers:
- 80
- 8080
default: 80
- url: https://api.gigantic-server.com:8080/{version}
description: The production API server
- url: https://localhost:8080/{version}
description: The local server
variables:
version:
enum:

View File

@ -254,8 +254,8 @@ module Petstore
}
},
{
url: "https://api.gigantic-server.com:8080/{version}",
description: "The production API server",
url: "https://localhost:8080/{version}",
description: "The local server",
variables: {
version: {
description: "No descriptoin provided",

View File

@ -40,12 +40,12 @@ describe Petstore::Configuration do
it 'should get the second url with default values' do
url = config.server_url(1)
expect(url).to eq("https://api.gigantic-server.com:8080/v2")
expect(url).to eq("https://localhost:8080/v2")
end
it 'should get the second url' do
url = config.server_url(1, version: "v1")
expect(url).to eq("https://api.gigantic-server.com:8080/v1")
expect(url).to eq("https://localhost:8080/v1")
end
it 'should raise error due to invalid enum value' do