@ -73,6 +73,7 @@ group :test, :development do
gem 'rspec-rails', '~> 3.1.0'
gem 'rspec-its', '~> 1.1.0'
gem 'rspec-collection_matchers', '~> 1.1.2'
gem 'rspec-mocks', '~> 3.1.3'
end
group :test do
@ -365,6 +365,7 @@ DEPENDENCIES
rails_config (~> 0.4.2)
rspec-collection_matchers (~> 1.1.2)
rspec-its (~> 1.1.0)
rspec-mocks (~> 3.1.3)
rspec-rails (~> 3.1.0)
sass-rails (~> 4.0.4)
seedbank (~> 0.3.0)
@ -12,7 +12,7 @@ class Domain < ActiveRecord::Base
after_save :sync_children
# this goes after sync_parent, to order callbacks correctly
acts_as_nested_interval virtual_root: true, dependent: :nullify
acts_as_nested_interval virtual_root: true, dependent: :restrict_with_error
validate :domain_ownership
def domain_ownership
@ -67,7 +67,7 @@ describe Domain do
User.do_as(user) do
# stub a parent domain on another user account, with no permissions present
mock_domain = mock(
mock_domain = double(
:user_id => user3.id,
:user => user3,
:name => 'x',