Spec Cleanup: Remove Unused and Redundant Code from Specs (#8385)
This commit is contained in:
parent
d33322f8e4
commit
d5a106d11e
10 changed files with 0 additions and 26 deletions
1
Gemfile
1
Gemfile
|
|
@ -135,7 +135,6 @@ group :development, :test do
|
|||
gem "bullet", "~> 6.1" # help to kill N+1 queries and unused eager loading
|
||||
gem "capybara", "~> 3.32" # Capybara is an integration testing tool for rack based web applications
|
||||
gem "faker", "~> 2.12" # A library for generating fake data such as names, addresses, and phone numbers
|
||||
gem "parallel_tests", "~> 2.32" # Run Test::Unit / RSpec / Cucumber / Spinach in parallel
|
||||
gem "pry-byebug", "~> 3.8" # Combine 'pry' with 'byebug'. Adds 'step', 'next', 'finish', 'continue' and 'break' commands to control execution
|
||||
gem "rspec-rails", "~> 4.0" # rspec-rails is a testing framework for Rails 3+
|
||||
gem "rubocop", "~> 0.85.1", require: false # Automatic Ruby code style checking tool
|
||||
|
|
|
|||
|
|
@ -539,8 +539,6 @@ GEM
|
|||
rack
|
||||
orm_adapter (0.5.0)
|
||||
parallel (1.19.1)
|
||||
parallel_tests (2.32.0)
|
||||
parallel
|
||||
parser (2.7.1.3)
|
||||
ast (~> 2.4.0)
|
||||
patron (0.13.3)
|
||||
|
|
@ -952,7 +950,6 @@ DEPENDENCIES
|
|||
omniauth (~> 1.9)
|
||||
omniauth-github (~> 1.3)
|
||||
omniauth-twitter (~> 1.4)
|
||||
parallel_tests (~> 2.32)
|
||||
patron (~> 0.13.3)
|
||||
percy-capybara (~> 4.2.0)
|
||||
pg (~> 1.2)
|
||||
|
|
|
|||
|
|
@ -127,13 +127,6 @@ RSpec.configure do |config|
|
|||
end
|
||||
end
|
||||
|
||||
# Allow testing with Stripe's test server. BE CAREFUL
|
||||
if config.filter_manager.inclusions.rules.include?(:live)
|
||||
WebMock.allow_net_connect!
|
||||
StripeMock.toggle_live(true)
|
||||
Rails.logger.info("Running **live** tests against Stripe...")
|
||||
end
|
||||
|
||||
config.before do
|
||||
stub_request(:any, /res.cloudinary.com/).to_rack("dsdsdsds")
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ RSpec.describe "Followers Dashboard", type: :system, js: true do
|
|||
|
||||
context "when /dashboard/user_followers is visited" do
|
||||
it "displays correct following buttons" do
|
||||
stub_request(:post, "http://www.google-analytics.com/collect")
|
||||
following_user.follow(user)
|
||||
followed_user.follow(user)
|
||||
user.follow(followed_user)
|
||||
|
|
|
|||
|
|
@ -5,10 +5,6 @@ RSpec.describe "Display articles search spec", type: :system, js: true, elastics
|
|||
let(:found_article_two) { create(:article) }
|
||||
let(:not_found_article) { create(:article) }
|
||||
|
||||
before do
|
||||
stub_request(:post, "http://www.google-analytics.com/collect")
|
||||
end
|
||||
|
||||
it "returns correct results for a search" do
|
||||
found_article_one.tags << create(:tag, name: "ruby")
|
||||
allow(found_article_two).to receive(:body_text).and_return("Ruby Tuesday")
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe "Display articles search spec", type: :system, js: true, elasticsearch: "FeedContent" do
|
||||
before do
|
||||
stub_request(:post, "http://www.google-analytics.com/collect")
|
||||
end
|
||||
|
||||
it "returns correct results for a search" do
|
||||
query = "<marquee='alert(document.cookie)'>XSS"
|
||||
found_comment = create(:comment, body_markdown: query)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ require "rails_helper"
|
|||
|
||||
RSpec.describe "Display Jobs Banner spec", type: :system, js: true do
|
||||
before do
|
||||
stub_request(:post, "http://www.google-analytics.com/collect")
|
||||
allow(SiteConfig).to receive(:jobs_url).and_return("www.very_cool_jobs_website.com")
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,6 @@ RSpec.describe "Display users search spec", type: :system, js: true, elasticsear
|
|||
let(:found_two_user) { create(:user, username: "doejane", name: "Doe Jane") }
|
||||
let(:not_found_user) { create(:user, username: "batman", name: "Batman") }
|
||||
|
||||
before do
|
||||
stub_request(:post, "http://www.google-analytics.com/collect")
|
||||
end
|
||||
|
||||
it "returns correct results for name search" do
|
||||
users = [current_user, found_user, found_two_user, not_found_user]
|
||||
index_documents_for_search_class(users, Search::User)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ RSpec.describe "User searches users", type: :system do
|
|||
end
|
||||
|
||||
it "shows the correct follow buttons", js: true, elasticsearch: "User" do
|
||||
stub_request(:post, "http://www.google-analytics.com/collect")
|
||||
visit "/search?q=&filters=class_name:User"
|
||||
|
||||
expect(JSON.parse(find_button("Edit profile")["data-info"])["id"]).to eq(current_user.id)
|
||||
|
|
|
|||
BIN
vendor/cache/parallel_tests-2.32.0.gem
vendored
BIN
vendor/cache/parallel_tests-2.32.0.gem
vendored
Binary file not shown.
Loading…
Add table
Reference in a new issue