require 'rails_helper' RSpec.describe "Api::V1::Parks", type: :request do describe "GET /index" do 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