Browse Source

Fixed unit tests.

Martin Edenhofer 10 years ago
parent
commit
80ea7e5337
2 changed files with 19 additions and 0 deletions
  1. 10 0
      test/unit/email_process_test.rb
  2. 9 0
      test/unit/twitter_test.rb

+ 10 - 0
test/unit/email_process_test.rb

@@ -3,6 +3,16 @@ require 'test_helper'
 
 class EmailProcessTest < ActiveSupport::TestCase
   test 'process simple' do
+
+    # needed to check correct behavior
+    Group.create_if_not_exists(
+      :id             => 2,
+      :name           => 'Twitter',
+      :note           => 'All Tweets.',
+      :updated_by_id  => 1,
+      :created_by_id  => 1
+    )
+
     files = [
       {
         :data => 'From: me@example.com

+ 9 - 0
test/unit/twitter_test.rb

@@ -3,6 +3,15 @@ require 'test_helper'
 
 class TwitterTest < ActiveSupport::TestCase
 
+  # needed to check correct behavior
+  Group.create_if_not_exists(
+    :id             => 2,
+    :name           => 'Twitter',
+    :note           => 'All Tweets.',
+    :updated_by_id  => 1,
+    :created_by_id  => 1
+  )
+
   # app config
   consumer_key    = 'd2zoZBmMXmT7KLPgEHSzpw'
   consumer_secret = 'QMUrlyDlqjITCkWdrOgsTxMVVLxr4A4IW3DIgtIg'