Browse files

basic test

  • Loading branch information...
1 parent 423f258 commit bb48929ae65507b482ea3e1d0fbb822e680e2da8 Neeraj Singh committed Jun 30, 2011
Showing with 21 additions and 0 deletions.
  1. +21 −0 test/rails_root/test/unit/user_phone_test.rb
View
21 test/rails_root/test/unit/user_phone_test.rb
@@ -0,0 +1,21 @@
+require "test_helper"
+require "minitest/autorun"
+
+class UserPhoneTest < MiniTest::Unit::TestCase
+
+ def setup
+ User.delete_all
+ PhoneNumber.delete_all
+ end
+
+ def test_pie_chart_for_user_with_phones_vs_users_without_phones
+ 5.times { Factory(:user) }
+ 3.times do
+ user = Factory(:user)
+ Factory(:phone_number, :user => user)
+ end
+ assert_equal 8, User.count
+ assert_equal 3, PhoneNumber.count
+ end
+end
+

0 comments on commit bb48929

Please sign in to comment.