correct specs

This commit is contained in:
Sam 2016-01-27 23:40:45 +11:00
parent 7b558f959e
commit b75353c26f
2 changed files with 3 additions and 3 deletions

View File

@ -152,9 +152,9 @@ class PostAlerter
group_name: g.name.downcase,
inbox_count: Topic.exec_sql(
"SELECT COUNT(*) FROM topics t
JOIN topic_allowed_groups g ON g.id = :group_id AND g.topic_id = t.id
JOIN topic_allowed_groups g ON g.group_id = :group_id AND g.topic_id = t.id
LEFT JOIN group_archived_messages a ON a.topic_id = t.id AND a.group_id = g.id
WHERE a.id IS NULL AND t.deleted_at is NULL AND t.archetype = 'private_message'",
WHERE a.id IS NULL AND t.deleted_at is NULL AND t.archetype = 'private_message'",
group_id: g.id).values[0][0].to_i
}
end

View File

@ -32,7 +32,7 @@ describe Admin::GroupsController do
"primary_group"=>false,
"grant_trust_level"=>nil,
"incoming_email"=>nil,
"notification_level"=>3,
"notification_level"=>2,
"has_messages"=>false
}])
end