Fix Rubocop issues
This commit is contained in:
parent
a4a6306198
commit
d63a22c54e
34 changed files with 151 additions and 137 deletions
|
|
@ -69,8 +69,8 @@ describe Admin::TicketsController do
|
|||
it 'creates new ticket' do
|
||||
expect do
|
||||
post :create, params: {
|
||||
ticket: attributes_for(:ticket),
|
||||
conference_id: conference
|
||||
ticket: attributes_for(:ticket),
|
||||
conference_id: conference
|
||||
}
|
||||
end.to change{ conference.tickets.count }.from(ticket_count).to(ticket_count + 1)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ feature Commercial do
|
|||
|
||||
scenario 'does not add an invalid commercial of an event', feature: true, js: true do
|
||||
# TODO-SNAPCON
|
||||
skip("Snap!Con allows all materials to be saved.")
|
||||
skip('Snap!Con allows all materials to be saved.')
|
||||
visit edit_conference_program_proposal_path(conference.short_title, event.id)
|
||||
click_link 'Materials'
|
||||
fill_in 'commercial_url', with: 'invalid_commercial_url'
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ feature 'Has correct abilities' do
|
|||
other_user = create(:user)
|
||||
ticket = conference.registration_tickets.first
|
||||
create(:paid_ticket_purchase,
|
||||
user: other_user, ticket: ticket, quantity: 1, conference: conference)
|
||||
user: other_user, ticket: ticket, quantity: 1, conference: conference)
|
||||
create(:registration, user: other_user, conference: conference)
|
||||
visit edit_admin_conference_registration_path(conference.short_title, conference.registrations.first)
|
||||
expect(current_path).to eq(edit_admin_conference_registration_path(conference.short_title, conference.registrations.first))
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ feature 'Has correct abilities' do
|
|||
other_user = create(:user)
|
||||
ticket = conference.registration_tickets.first
|
||||
create(:paid_ticket_purchase,
|
||||
user: other_user, ticket: ticket, quantity: 1, conference: conference)
|
||||
user: other_user, ticket: ticket, quantity: 1, conference: conference)
|
||||
create(:registration, user: other_user, conference: conference)
|
||||
visit edit_admin_conference_registration_path(conference.short_title, conference.registrations.first)
|
||||
expect(current_path).to eq(edit_admin_conference_registration_path(conference.short_title, conference.registrations.first))
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ describe FormatHelper, type: :helper do
|
|||
expect(Redcarpet::Markdown).to receive(:new)
|
||||
.with(
|
||||
Redcarpet::Render::HTML,
|
||||
autolink: true,
|
||||
autolink: true,
|
||||
space_after_headers: true,
|
||||
tables: true,
|
||||
strikethrough: true,
|
||||
footnotes: true,
|
||||
superscript: true
|
||||
tables: true,
|
||||
strikethrough: true,
|
||||
footnotes: true,
|
||||
superscript: true
|
||||
)
|
||||
.and_call_original
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#
|
||||
# index_conferences_on_organization_id (organization_id)
|
||||
#
|
||||
#!/bin/env ruby
|
||||
# !/bin/env ruby
|
||||
require 'spec_helper'
|
||||
|
||||
describe Conference do
|
||||
|
|
|
|||
|
|
@ -35,6 +35,6 @@ def mock_commercial_request
|
|||
end
|
||||
|
||||
def mock_image_request
|
||||
WebMock.stub_request(:post, "https://api.cloudinary.com/v1_1/snapcon/image/destroy").
|
||||
to_return(status: 200, body: {}.to_json, headers: {})
|
||||
WebMock.stub_request(:post, 'https://api.cloudinary.com/v1_1/snapcon/image/destroy')
|
||||
.to_return(status: 200, body: {}.to_json, headers: {})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ module OmniauthMacros
|
|||
ENV['OSEM_DISCOURSE_KEY'] = 'test key discourse'
|
||||
ENV['OSEM_DISCOURSE_SECRET'] = 'test secret discourse'
|
||||
|
||||
|
||||
|
||||
def mock_auth_new_user
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
|
|
@ -90,6 +88,10 @@ module OmniauthMacros
|
|||
# account is available for every supported omniauth provider.
|
||||
# These must be identical to the ones in /config/environments/development.rb
|
||||
# Remember to keep them in sync with development.rb
|
||||
#
|
||||
# Note that the method length check is disabled to allow for better formatting
|
||||
# of the user params.
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def mock_auth_accounts
|
||||
OmniAuth.config.mock_auth[:facebook] =
|
||||
OmniAuth::AuthHash.new(
|
||||
|
|
@ -166,4 +168,5 @@ module OmniauthMacros
|
|||
}
|
||||
)
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue