mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-29 05:51:22 +00:00
758dfda988
Mostly tests
24 lines
432 B
Ruby
24 lines
432 B
Ruby
require 'rails_helper'
|
|
|
|
module Api
|
|
module V1
|
|
end
|
|
end
|
|
|
|
describe Api::V1::MapsController do
|
|
before do
|
|
request.accept = 'application/json'
|
|
end
|
|
|
|
describe '#index' do
|
|
let!(:map) { Map.new() }
|
|
|
|
it 'returns a list of maps' do
|
|
get :index
|
|
expect(response).to be_success
|
|
expect(json['maps'].length).to eq(1)
|
|
json_map = json['maps'][0]
|
|
expect(json_map['id']).to eq(map.id)
|
|
end
|
|
end
|
|
end
|