mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 21:10:54 +00:00
29 lines
540 B
Ruby
Executable file
29 lines
540 B
Ruby
Executable file
require 'rails_helper'
|
|
|
|
module Api
|
|
module V1
|
|
end
|
|
end
|
|
|
|
describe Api::V1::MapsController do
|
|
before do
|
|
request.accept = "application/json"
|
|
create_list :map, 20
|
|
end
|
|
|
|
describe '#index' do
|
|
it "return N maps" do
|
|
get :index
|
|
expect(response).to have_http_status(:success)
|
|
expect(json["maps"].length).to eq(20)
|
|
end
|
|
|
|
# FIXME. Find the right map id
|
|
it "return right map id" do
|
|
skip
|
|
map = create(:map)
|
|
get :index
|
|
expect(json["maps"].last["id"]).to eq(map.id)
|
|
end
|
|
end
|
|
end
|