---
src/app/models/provider.rb | 3 ++-
src/spec/models/provider_spec.rb | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/models/provider.rb b/src/app/models/provider.rb
index 1d70232..8eca2b5 100644
--- a/src/app/models/provider.rb
+++ b/src/app/models/provider.rb
@@ -51,6 +51,7 @@ class Provider < ActiveRecord::Base
validates_format_of :name, :with => /^[\w -]*$/n, :message => "must only
contain: numbers, letters, spaces, '_' and '-'"
validates_length_of :name, :maximum => 255
+ validate :validate_provider
has_many :permissions, :as => :permission_object, :dependent => :destroy,
:include => [:role],
@@ -106,4 +107,4 @@ class Provider < ActiveRecord::Base
connect.nil? ? false : true
end
-end
+end
\ No newline at end of file
diff --git a/src/spec/models/provider_spec.rb b/src/spec/models/provider_spec.rb
index dfbab75..0cb52bc 100644
--- a/src/spec/models/provider_spec.rb
+++ b/src/spec/models/provider_spec.rb
@@ -79,7 +79,6 @@ describe Provider do
instance = FactoryGirl.create(:instance)
provider = instance.provider_account.provider
- provider.destroy
provider.destroyed?.should be_false
end
end
--
1.7.6