mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-14 20:37:49 -05:00
21 lines
425 B
Ruby
21 lines
425 B
Ruby
require 'spec_helper'
|
|
|
|
describe RolesController do
|
|
|
|
def valid_attributes
|
|
{ "name" => "MyString" }
|
|
end
|
|
|
|
login_member(:admin_member)
|
|
|
|
describe "GET index" do
|
|
it "assigns all roles as @roles" do
|
|
role = Role.create! valid_attributes
|
|
get :index, {}
|
|
# note that admin role exists because of login_admin_member
|
|
assigns(:roles).should eq([Role.find_by_name('admin'), role])
|
|
end
|
|
end
|
|
|
|
end
|