Improve spec expectations
This commit is contained in:
@@ -2,9 +2,19 @@ require 'rails_helper'
|
||||
|
||||
RSpec.describe "Api::V1::Parks", type: :request do
|
||||
describe "GET /index" do
|
||||
it "returns http success" do
|
||||
get "/api/v1/parks/index"
|
||||
it "returns some parks" do
|
||||
get api_v1_parks_url
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(response.parsed_body).to include(
|
||||
hash_including(
|
||||
code: "crla", name: "Crater Lake National Park", states: "OR"
|
||||
)
|
||||
)
|
||||
expect(response.parsed_body).to include(
|
||||
hash_including(
|
||||
code: "olym", name: "Olympic National Park", states: "WA"
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user