DEV: Fix false positive tests.

This commit is contained in:
Guo Xiang Tan 2020-07-24 10:52:13 +08:00
parent 181c4eb760
commit 56107dbc3e
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20

View File

@ -539,13 +539,14 @@ describe SearchController do
ip_address: '127.0.0.1'
)
post "/search/click", params: {
post "/search/click.json", params: {
search_log_id: search_log_id,
search_result_id: 12345,
search_result_type: 'topic'
}
expect(response.status).to eq(200)
expect(response.parsed_body["success"]).to be_present
expect(SearchLog.find(search_log_id).search_result_id).to be_blank
end
@ -598,13 +599,14 @@ describe SearchController do
ip_address: '192.168.0.19'
)
post "/search/click", params: {
post "/search/click.json", params: {
search_log_id: search_log_id,
search_result_id: 22222,
search_result_type: 'topic'
}
expect(response.status).to eq(200)
expect(response.parsed_body["success"]).to be_present
expect(SearchLog.find(search_log_id).search_result_id).to be_blank
end