* thanks to @maxwell for the initial work on this port admin pages to bootstrap * improve user view on admin search page * add 'close account' link to each user in the search results * keep the same blue color for the admin menu some refactoring of the routes and the admin code * try to be more RESTful (possibly) * use a 'UserSearch' model for search parameters and querying add changelog entry
22 lines
463 B
Ruby
22 lines
463 B
Ruby
|
|
require 'spec_helper'
|
|
|
|
describe Admin::UsersController do
|
|
before do
|
|
@user = FactoryGirl.create :user
|
|
Role.add_admin(@user.person)
|
|
|
|
sign_in :user, @user
|
|
end
|
|
|
|
describe '#close_account' do
|
|
it 'queues a job to disable the given account' do
|
|
other_user = FactoryGirl.create :user
|
|
other_user.should_receive(:close_account!)
|
|
User.stub(:find).and_return(other_user)
|
|
|
|
post :close_account, id: other_user.id
|
|
end
|
|
end
|
|
|
|
end
|