Changes for sub_roles

Issues: update doesn't create new i18n_variables, role form has bugs
This commit is contained in:
chris2tof committed 2011-12-18 10:07:42 +08:00
1 parent d23cf152da
commit d27d7a623c
62 files changed
+508 -1142

No files matched your search

+4
View File
@@ -5,6 +5,7 @@ describe Role do
@role = Role.create(:key => 'teacher',
:i18n_variable => {:key => 'teacher', :en => 'Teacher', :zh_tw => 'Teacher in Chinese', :document_class => 'Role'},
:sub_roles => [{:key => 'undergrad',
:i18n_variable => {:key => 'yeah', :en => 'Yeah', :zh_tw => 'Yeah', :document_class => 'Role'},
:attribute_fields => [{:key => 'department'},
{:key => 'room'}]},
{:key => 'master',
@@ -35,6 +36,9 @@ describe Role do
it 'should have :disabled false' do
@role.sub_roles[0].disabled.should be false
end
it 'should have a i18n_variable' do
@role.sub_roles[0].i18n_variable.should be_an_instance_of I18nVariable
end
end
describe '#AttributeField' do
it 'should have :built_in false' do