diff options
| author | mo khan <mo@mokhan.ca> | 2014-11-21 17:04:57 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-11-21 17:04:57 -0700 |
| commit | 8e250fb36f432ca0c575f8a669ec173d20aa7379 (patch) | |
| tree | 5741a11f8c637ed76fc82222e0d43718cd31639d /spec/controllers/api | |
| parent | 6de9e0cf713db420716d57ae5c51d2428b776d86 (diff) | |
add specs for users.
Diffstat (limited to 'spec/controllers/api')
| -rw-r--r-- | spec/controllers/api/v2/users_controller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/api/v2/users_controller_spec.rb b/spec/controllers/api/v2/users_controller_spec.rb index 2fcd4164..61368cd2 100644 --- a/spec/controllers/api/v2/users_controller_spec.rb +++ b/spec/controllers/api/v2/users_controller_spec.rb @@ -3,6 +3,15 @@ require 'rails_helper' module Api module V2 describe UsersController do + describe "#index" do + let!(:user) { create(:user) } + + it 'loads all users' do + xhr :get, :index + expect(assigns(:users)).to match_array([user]) + end + end + describe "#show" do let!(:user) { create(:user) } |
