Browse Source

Do not create a default email address. Will be done by wizard automatically.

Martin Edenhofer 9 years ago
parent
commit
51c450cc0c
3 changed files with 14 additions and 8 deletions
  1. 0 8
      db/seeds.rb
  2. 13 0
      test/fixtures/seeds.rb
  3. 1 0
      test/test_helper.rb

+ 0 - 8
db/seeds.rb

@@ -1426,13 +1426,6 @@ Setting.create_if_not_exists(
   frontend: true
 )
 
-email_address = EmailAddress.create_if_not_exists(
-  id: 1,
-  realname: 'Zammad',
-  email: 'zammad@localhost',
-  updated_by_id: 1,
-  created_by_id: 1
-)
 signature = Signature.create_if_not_exists(
   id: 1,
   name: 'default',
@@ -1473,7 +1466,6 @@ Role.create_if_not_exists(
 Group.create_if_not_exists(
   id: 1,
   name: 'Users',
-  email_address_id: email_address.id,
   signature_id: signature.id,
   note: 'Standard Group/Pool for Tickets.',
   updated_by_id: 1,

+ 13 - 0
test/fixtures/seeds.rb

@@ -0,0 +1,13 @@
+# encoding: utf-8
+# inital data set as extention to db/seeds.rb
+email_address = EmailAddress.create_if_not_exists(
+  id: 1,
+  realname: 'Zammad',
+  email: 'zammad@localhost',
+  updated_by_id: 1,
+  created_by_id: 1
+)
+Group.all.each {|group|
+  group.email_address_id = email_address.id
+  group.save
+}

+ 1 - 0
test/test_helper.rb

@@ -22,6 +22,7 @@ class ActiveSupport::TestCase
 
   # load seeds
   load "#{Rails.root}/db/seeds.rb"
+  load "#{Rails.root}/test/fixtures/seeds.rb"
 
   # proccess background jobs
   Delayed::Worker.new.work_off