mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-31 23:10:44 +00:00
28 lines
511 B
Ruby
Executable file
28 lines
511 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
|
|
#it "return right map id" do
|
|
# map = create(:map)
|
|
# get :index
|
|
# expect(json["maps"].last["id"]).to eq(map.id)
|
|
#end
|
|
end
|
|
end
|