oops, migration was flipping
This commit is contained in:
parent
69cfab62b8
commit
03388e11ab
|
@ -4,7 +4,7 @@ class AddLikedAndBookmarkedToTopicUser < ActiveRecord::Migration
|
|||
add_column :topic_users, :bookmarked, :boolean, default: false
|
||||
|
||||
# likes and bookmarks PostActionType.types[:like] and :bookmark which should not be used in a migration
|
||||
{liked: 1, bookmarked: 2}.each do |name, type|
|
||||
{liked: 2, bookmarked: 1}.each do |name, type|
|
||||
execute "UPDATE topic_users
|
||||
SET #{name} = true
|
||||
WHERE EXISTS (SELECT 1 FROM post_actions pa
|
||||
|
|
|
@ -151,6 +151,7 @@ describe PostAction do
|
|||
|
||||
tu = TopicUser.get(post.topic, codinghorror)
|
||||
expect(tu.liked).to be true
|
||||
expect(tu.bookmarked).to be false
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue