Annotations and test update
This commit is contained in:
parent
7d6611def6
commit
81647dc590
|
|
@ -13,3 +13,21 @@ module DiscourseSolved
|
|||
validates :answer_post_id, presence: true
|
||||
end
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: discourse_solved_solved_topics
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# topic_id :integer not null
|
||||
# answer_post_id :integer not null
|
||||
# accepter_user_id :integer not null
|
||||
# topic_timer_id :integer
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_discourse_solved_solved_topics_on_answer_post_id (answer_post_id) UNIQUE
|
||||
# index_discourse_solved_solved_topics_on_topic_id (topic_id) UNIQUE
|
||||
#
|
||||
|
|
|
|||
|
|
@ -423,6 +423,7 @@ RSpec.describe "Managing Posts solved status" do
|
|||
|
||||
expect(p1.topic.assignment.status).to eq("New")
|
||||
DiscourseSolved.accept_answer!(p1, user)
|
||||
topic.reload
|
||||
|
||||
expect(topic.solved.answer_post_id).to eq(p1.id)
|
||||
expect(p1.topic.assignment.reload.status).to eq("Done")
|
||||
|
|
|
|||
Loading…
Reference in New Issue