Merge branch 'master' into openapi/merge

This commit is contained in:
Greg Myers
2020-04-04 20:05:00 +01:00
committed by GitHub
12 changed files with 91 additions and 16 deletions

View File

@@ -2,11 +2,11 @@
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

View File

@@ -5,8 +5,8 @@ RSpec.feature 'swagger-ui', js: true do
scenario 'browsing api-docs' do
visit '/api-docs'
expect(page).to have_content('GET /blogs Searches blogs')
expect(page).to have_content('POST /blogs Creates a blog')
expect(page).to have_content('GET /blogs/{id} Retrieves a blog')
expect(page).to have_content('GET /blogs Searches blogs', normalize_ws: true)
expect(page).to have_content('POST /blogs Creates a blog', normalize_ws: true)
expect(page).to have_content('GET /blogs/{id} Retrieves a blog', normalize_ws: true)
end
end

View File

@@ -53,7 +53,15 @@ RSpec.configure do |config|
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")
Capybara.javascript_driver = :webkit
Capybara.register_driver :firefox_headless do |app|
options = ::Selenium::WebDriver::Firefox::Options.new
options.args << '--headless'
Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
end
Capybara.javascript_driver = :firefox_headless
end
Capybara::Webkit.configure(&:block_unknown_urls)