From 5a3b540ec26fe65792dc41310d9f9dbc3fccf1e9 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 31 May 2013 22:53:35 -0400 Subject: [PATCH] More test stuff --- test/unit/alert_test.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/unit/alert_test.rb b/test/unit/alert_test.rb index e803214..8a12865 100644 --- a/test/unit/alert_test.rb +++ b/test/unit/alert_test.rb @@ -9,7 +9,7 @@ class AlertTest < ActiveSupport::TestCase @user_one = users(:one) end - test "creating a new alert creates an alert" do + test "should create a new alert" do assert_kind_of Alert, Alert.new end @@ -25,8 +25,11 @@ class AlertTest < ActiveSupport::TestCase assert !Alert.user_alerts(@user_one).empty? end - #test "should only return alerts for correct user when asked" do - # again, should test with actual user - #assert Alert.user_alerts(@user_one).all? { |a| a == @user_one } - #end + test "should only return alerts for correct user when asked" do + assert Alert.user_alerts(@user_one).all? { |a| a.user_id == @user_one.id } + end + + test "should return the full course name" do + assert_equal @alert_one.course_name, "CSE 101" + end end