Update Banisher (#3495) [ci skip]
This commit is contained in:
parent
ebf9208877
commit
9f6cf61911
2 changed files with 9 additions and 3 deletions
|
|
@ -41,7 +41,8 @@ module Moderator
|
|||
location: "", education: "", employer_name: "", employer_url: "", employment_title: "",
|
||||
mostly_work_with: "", currently_learning: "", currently_hacking_on: "", available_for: "",
|
||||
email_public: false, facebook_url: nil, dribbble_url: nil, medium_url: nil, stackoverflow_url: nil,
|
||||
behance_url: nil, linkedin_url: nil, gitlab_url: nil, instagram_url: nil, mastodon_url: nil, twitch_url: nil
|
||||
behance_url: nil, linkedin_url: nil, gitlab_url: nil, instagram_url: nil, mastodon_url: nil,
|
||||
twitch_url: nil, feed_url: nil
|
||||
)
|
||||
|
||||
user.update_columns(profile_image: "https://thepracticaldev.s3.amazonaws.com/i/99mvlsfu5tfj9m7ku25d.png")
|
||||
|
|
|
|||
|
|
@ -7,8 +7,13 @@ RSpec.describe "AdditionalContentBoxes", type: :request do
|
|||
|
||||
describe "GET /additional_content_boxes" do
|
||||
it "returns an article if there is a published/featured one" do
|
||||
suggestion = create(:article, published: true, featured: true)
|
||||
suggestion.update_column(:positive_reactions_count, 300)
|
||||
suggestion = build_stubbed(:article, published: true, featured: true, path: "blah")
|
||||
suggestion.title = "Title of the article"
|
||||
|
||||
fake = instance_double(Suggester::Articles::Classic)
|
||||
allow(Suggester::Articles::Classic).to receive(:new).and_return(fake)
|
||||
allow(fake).to receive(:get).and_return([suggestion])
|
||||
|
||||
get "/additional_content_boxes?article_id=#{regular_article.id}&state=include_sponsors"
|
||||
expect(response.body).to include CGI.escapeHTML(suggestion.title)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue