fix tests

This commit is contained in:
r888888888
2014-09-30 17:24:54 -07:00
parent 6dce66f33d
commit 74e1355728
3 changed files with 2 additions and 9 deletions

View File

@@ -208,7 +208,7 @@ class ForumPost < ActiveRecord::Base
def update_email_notifications
subscription = ForumSubscription.where(:forum_topic_id => topic_id, :user_id => CurrentUser.user.id).first
if receive_email_notifications == "1"
if receive_email_notifications == "1" || receive_email_notifications == true
if subscription
subscription.update_attribute(:last_read_at, updated_at)
else

View File

@@ -6253,13 +6253,6 @@ CREATE INDEX index_forum_subscriptions_on_user_id ON forum_subscriptions USING b
CREATE INDEX index_forum_topic_visits_on_forum_topic_id ON forum_topic_visits USING btree (forum_topic_id);
--
-- Name: index_forum_topic_visits_on_last_read_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_forum_topic_visits_on_last_read_at ON forum_topic_visits USING btree (last_read_at);
--
-- Name: index_forum_topic_visits_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--

View File

@@ -170,6 +170,6 @@ class DTextTest < ActiveSupport::TestCase
end
def test_forum_links
assert_equal('<p><a href="/forum_topics/1234?page=4">topic #1234</a></p>', p("topic #1234/p4"))
assert_equal('<p><a href="/forum_topics/1234?page=4">topic #1234/p4</a></p>', p("topic #1234/p4"))
end
end