Commit 312532a1b6535c6edcafe4d0fed05c78b968a474
1 parent
dc4ccf34
Exists in
master
and in
29 other branches
Saving some time in CreateEnterpriseTest
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
test/unit/create_enterprise_test.rb
... | ... | @@ -45,7 +45,7 @@ class CreateEnterpriseTest < Test::Unit::TestCase |
45 | 45 | end |
46 | 46 | |
47 | 47 | should 'require that the informed target (validator organization) actually validates for the chosen region' do |
48 | - environment = Environment.create!(:name => "My environment") | |
48 | + environment = fast_create(Environment) | |
49 | 49 | region = Region.create!(:name => 'My region', :environment_id => environment.id) |
50 | 50 | validator = Organization.create!(:name => "My organization", :identifier => 'myorg', :environment_id => environment.id) |
51 | 51 | |
... | ... | @@ -93,7 +93,7 @@ class CreateEnterpriseTest < Test::Unit::TestCase |
93 | 93 | |
94 | 94 | should 'actually create an enterprise when finishing the task and associate the task requestor as its owner through the "user" association' do |
95 | 95 | |
96 | - environment = Environment.create!(:name => "My environment", :contact_email => 'test@localhost.localdomain') | |
96 | + environment = fast_create(Environment) | |
97 | 97 | region = Region.create!(:name => 'My region', :environment_id => environment.id) |
98 | 98 | validator = Organization.create!(:name => "My organization", :identifier => 'myorg', :environment_id => environment.id) |
99 | 99 | region.validators << validator |
... | ... | @@ -127,7 +127,7 @@ class CreateEnterpriseTest < Test::Unit::TestCase |
127 | 127 | |
128 | 128 | should 'actually create an enterprise when finishing the task and associate the task requestor as its owner through the "user" association even when environment is not default' do |
129 | 129 | |
130 | - environment = Environment.create!(:name => "My environment", :contact_email => 'test@localhost.localdomain') | |
130 | + environment = fast_create(Environment) | |
131 | 131 | region = Region.create!(:name => 'My region', :environment_id => environment.id) |
132 | 132 | validator = Organization.create!(:name => "My organization", :identifier => 'myorg', :environment_id => environment.id) |
133 | 133 | region.validators << validator |
... | ... | @@ -169,7 +169,7 @@ class CreateEnterpriseTest < Test::Unit::TestCase |
169 | 169 | end |
170 | 170 | |
171 | 171 | should 'validate that eveything is ok but the validator (target)' do |
172 | - environment = Environment.create!(:name => "My environment", :contact_email => 'test@localhost.localdomain') | |
172 | + environment = fast_create(Environment) | |
173 | 173 | region = Region.create!(:name => 'My region', :environment_id => environment.id) |
174 | 174 | validator = Organization.create!(:name => "My organization", :identifier => 'myorg', :environment_id => environment.id) |
175 | 175 | region.validators << validator | ... | ... |