work in progress, add fidelity to category group permissions (full, create posts, readonly)

This commit is contained in:
Sam
2013-07-14 11:24:16 +10:00
parent 8d947535a8
commit ecf17cfebb
38 changed files with 349 additions and 126 deletions

View File

@ -134,11 +134,11 @@ describe CategoriesController do
describe 'success' do
before do
# might as well test this as well
@category.allow(Group[:admins])
# might as well test this while at it
@category.set_permissions(:admins => :full)
@category.save
xhr :put, :update, id: @category.id, name: 'science', color: '000', text_color: '0ff', group_names: Group[:staff].name, secure: 'true'
xhr :put, :update, id: @category.id, name: 'science', color: '000', text_color: '0ff', group_names: Group[:staff].name, read_restricted: 'true'
@category.reload
end
@ -146,7 +146,7 @@ describe CategoriesController do
@category.name.should == 'science'
@category.color.should == '000'
@category.text_color.should == '0ff'
@category.secure?.should be_true
@category.read_restricted?.should be_true
@category.groups.count.should == 1
end
end