ensl.org/spec/controllers/api/v1/maps_controller_spec.rb
Luke Barratt 944c55a869 Upgrade ruby to 2.2.2. Bump rails to 3.2.22
- Upgrade RSpec to 3.3
- Auto formatted existing specs
- Fixes broken test assertions
- Update capistrano rbenv_ruby to target 2.2.2
- Added test-unit as test dependency as it has been removed form ruby 2.2
2015-08-15 12:50:28 +01:00

20 lines
400 B
Ruby

require 'spec_helper'
describe Api::V1::MapsController do
before do
request.accept = 'application/json'
end
describe '#index' do
let!(:map) { create :map }
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