spec/models/permissions_spec.rb in volt-0.9.3.pre1 vs spec/models/permissions_spec.rb in volt-0.9.3.pre2
- old
+ new
@@ -45,10 +45,17 @@
allow
end
end
describe 'model permissions' do
+ let(:user_todo) { TestUserTodo.new }
+
+ it 'auto-associates users via own_by_user' do
+ #TODO: better assertions
+ expect(user_todo.respond_to?(:user)).to be(true)
+ end
+
it 'should follow CRUD states when checking permissions' do
todo = TestUserTodoWithCrudStates.new.buffer
spec_err = nil
@@ -108,9 +115,11 @@
end
end
it 'should not check the read permissions when updating (so that all fields are present for the permissions check)' do
model = store._test_update_read_checks!.append(name: 'Ryan').sync
+
+ expect(model.new?).to eq(false)
expect(model.create_check).to eq(true)
expect(model.read_check).to eq(nil)
# Update