Skip to content
Browse files

Added tests for associations

  • Loading branch information...
1 parent 9b6185f commit a3daae047dbf7c738a4772da427fef4e95a70e90 @chicks chicks committed Feb 27, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/functional/sugar_beans_controller_test.rb
View
9 test/functional/sugar_beans_controller_test.rb
@@ -19,9 +19,18 @@ class SugarBeansControllerTest < ActionController::TestCase
assert_response :success
end
+ test "should get users/seed_max_id/meetings" do
+ get(:show_associations, {:module => "users", :id => "seed_max_id", :association => "meetings"})
+ assert_equal SugarCRM::User.find("seed_max_id"), assigns(@bean)["bean"]
+ assert_response :success
+ end
+
+
test "should render available modules on invalid module param" do
get(:list, {:module => "kittens"})
assert_template 'available_modules'
end
+
+
end

0 comments on commit a3daae0

Please sign in to comment.
Something went wrong with that request. Please try again.