Skip to content

Commit

Permalink
Fixed domain db specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Jul 29, 2010
1 parent d4ac3d8 commit fb83654
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/domain_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DomainDatabase < SystemModel
belongs_to :client
has_many :domains

validates_uniqueness_of :name
validates_uniqueness_of :name, :allow_nil => true
validates_presence_of :client_id

validates_numericality_of :max_file_storage
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/manage/domains_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@

it "should be able to setup a domain with a new database" do
@another_domain = @another_client.domains.create :name => 'another-test-domain.dev', :status => 'setup'
DomainModel.should_receive(:run_worker).with('Domain', @another_domain.id, 'initialize_database')
DomainModel.should_receive(:run_worker).with('Domain', @another_domain.id, 'initialize_database', {:max_file_storage=>10240})
post 'setup', :path => [@another_domain.id], :domain => {:database => 'create'}
@another_domain.reload
@another_domain.status.should == 'initializing'
Expand Down
1 change: 0 additions & 1 deletion spec/models/domain_database_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
it "should be a valid domain database" do
@db = DomainDatabase.new
@db.valid?
@db.should have(1).errors_on(:name)
@db.should have(1).errors_on(:client_id)
end

Expand Down

0 comments on commit fb83654

Please sign in to comment.