<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,8 +3,8 @@ require File.dirname(__FILE__) + '/../test_helper'
 class AddressTest &lt; Test::Unit::TestCase
   fixtures :addresses
 
-  # Replace this with your real tests.
-  def test_truth
-    assert true
+  def test_01_must_be_either_user_or_customer_address
+    # just a few quick queries, might be better on real world data
+    assert_equal 0, Address.count(:conditions =&gt; ['owned_by_user = ? AND customer_id IS NOT NULL', true])
   end
 end</diff>
      <filename>test/unit/address_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,12 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
 class CustomerTest &lt; ActiveSupport::TestCase
-  # Replace this with your real tests.
-  def test_truth
-    assert true
+  fixtures :customers
+
+  def test_01_invoices
+    customer1 = Customer.find 1
+    user1 = User.find 1
+    assert_equal customer1.invoices.find(:first), Invoice.find(:first)
+    assert_equal customer1.invoices.find(:first).sender_address, user1.user_addresses.find(:first)
   end
 end</diff>
      <filename>test/unit/customer_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
 class UserTest &lt; ActiveSupport::TestCase
+  fixtures :addresses
 
   # should have one user_address and two addresses (includes the own one)
   def test_01_addresses</diff>
      <filename>test/unit/user_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a23ac106e19d56f8216c1fd0e08059ef9eff023d</id>
    </parent>
  </parents>
  <author>
    <name>TomK32</name>
    <email>tomk32@tomk32.de</email>
  </author>
  <url>http://github.com/TomK32/exabuch/commit/aa314ef12ee698507f1216c74ea1d58649190415</url>
  <id>aa314ef12ee698507f1216c74ea1d58649190415</id>
  <committed-date>2008-05-14T10:51:18-07:00</committed-date>
  <authored-date>2008-05-14T10:51:18-07:00</authored-date>
  <message>some easy unit-tests</message>
  <tree>3d3e089635dcfecade0231ce26e3c725a23406c8</tree>
  <committer>
    <name>TomK32</name>
    <email>tomk32@tomk32.de</email>
  </committer>
</commit>
