Flaky Spec Fix: Set Profile Image to Nil to Avoid Server Errors in js Specs (#8350)
This commit is contained in:
parent
a6b0c1082c
commit
a5f6183554
3 changed files with 4 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ before_install:
|
|||
- sudo systemctl start elasticsearch
|
||||
install:
|
||||
- bundle config set path 'vendor/bundle'
|
||||
- bundle install --local --jobs 2
|
||||
- bundle install --local --jobs=2
|
||||
- yarn install --frozen-lockfile
|
||||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
|
||||
> ./cc-test-reporter
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ RSpec.describe "User visits articles by tag", type: :system do
|
|||
let(:iot_tag) { create(:tag, name: "IoT") }
|
||||
let!(:func_tag) { create(:tag, name: "functional") }
|
||||
|
||||
let(:author) { create(:user) }
|
||||
let(:author) { create(:user, profile_image: nil) }
|
||||
let!(:article) { create(:article, tags: "javascript, IoT", user: author, published_at: 2.days.ago, score: 5) }
|
||||
let!(:article2) { create(:article, tags: "functional", user: author, published_at: Time.current, score: 5) }
|
||||
let!(:article3) { create(:article, tags: "functional, javascript", user: author, published_at: 2.weeks.ago, score: 5) }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe "User visits a homepage", type: :system do
|
||||
let!(:article) { create(:article, reactions_count: 12, featured: true) }
|
||||
let!(:article2) { create(:article, reactions_count: 20, featured: true) }
|
||||
let!(:article) { create(:article, reactions_count: 12, featured: true, user: create(:user, profile_image: nil)) }
|
||||
let!(:article2) { create(:article, reactions_count: 20, featured: true, user: create(:user, profile_image: nil)) }
|
||||
let!(:timestamp) { "2019-03-04T10:00:00Z" }
|
||||
|
||||
context "when no options specified" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue