Merge branch 'master' of github.com:snap-cloud/snapcon into admin-ticketing

* 'master' of github.com:snap-cloud/snapcon: (22 commits)
  Cleanup some Auth specs and weird haml syntax
  add sentry puma hooks
  fix user model spec
  Tweak Tickets Text
  fix missing ]
  Fix specs for omniauth providers?
  Update stripe mock gem
  remove airbrake
  Add sentry logging
  Update stripe gem
  Cleanup stripe stuff
  Fix the docker init script
  Cleanup specs
  Cleanup config file, ensure providers are set if present
  Fix format spec with new markdown options
  Try to update spec file with image in navbar
  Delint
  Delint helpers
  Lint: Sort gems
  Update user model spec
  ...
This commit is contained in:
Michael Ball 2020-02-06 02:02:20 -08:00
commit be991c53d3
18 changed files with 113 additions and 96 deletions

View file

@ -98,7 +98,8 @@ feature Conference do
sign_in user
visit admin_conference_path(conference.short_title)
expect(find('.navbar-brand').text).to eq(conference.organization.name)
# expect(find('.navbar-brand')).to eq(conference.organization.name)
expect(find('.navbar-brand img')['alt']).to have_content conference.organization.name
end
it_behaves_like 'add and update conference'

View file

@ -65,16 +65,19 @@ describe ApplicationHelper, type: :helper do
describe 'navigation title link' do
it 'should default to OSEM' do
ENV.delete('OSEM_NAME')
expect(nav_root_link_for(nil)).to match 'OSEM'
# TODO:Snap!Con: expect(nav_root_link_for(nil)).to match 'OSEM'
expect(nav_root_link_for(nil)).to match image_tag('snapcon_logo.png')
end
it 'should use the environment variable' do
ENV['OSEM_NAME'] = Faker::Company.name + "'"
expect(nav_root_link_for(nil)).to match h(ENV['OSEM_NAME'])
# expect(nav_root_link_for(nil)).to match h(ENV['OSEM_NAME'])
expect(nav_root_link_for(nil)).to match image_tag('snapcon_logo.png')
end
it 'should use the conference organization name' do
expect(nav_root_link_for(conference)).to match h(conference.organization.name)
# expect(nav_root_link_for(conference)).to match h(conference.organization.name)
expect(nav_root_link_for(nil)).to match image_tag('snapcon_logo.png')
end
end
end

View file

@ -11,7 +11,15 @@ describe FormatHelper, type: :helper do
it 'should return HTML for header markdown' do
expect(Redcarpet::Markdown).to receive(:new)
.with(Redcarpet::Render::HTML, autolink: true, space_after_headers: true, no_intra_emphasis: true)
.with(
Redcarpet::Render::HTML,
autolink: true,
space_after_headers: true,
tables: true,
strikethrough: true,
footnotes: true,
superscript: true
)
.and_call_original
expect(markdown('# this is my header')).to eq "<h1>this is my header</h1>\n"

View file

@ -468,7 +468,8 @@ describe User do
describe '.omniauth_providers' do
it 'contains providers' do
expect(User.omniauth_providers).to eq [:suse, :google, :facebook, :github]
# expect(User.omniauth_providers).to eq [:suse, :google, :facebook, :github]
expect(User.omniauth_providers).to eq [:google, :discourse]
end
end
end

View file

@ -6,12 +6,12 @@ module OmniauthMacros
ENV['OSEM_GOOGLE_KEY'] = 'test key google'
ENV['OSEM_GOOGLE_SECRET'] = 'test secret google'
ENV['OSEM_FACEBOOK_KEY'] = 'test key facebook'
ENV['OSEM_FACEBOOK_SECRET'] = 'test secret facebook'
ENV['OSEM_SUSE_KEY'] = 'test key suse'
ENV['OSEM_SUSE_SECRET'] = 'test secret suse'
ENV['OSEM_GITHUB_KEY'] = 'test key github'
ENV['OSEM_GITHUB_SECRET'] = 'test secret github'
# ENV['OSEM_FACEBOOK_KEY'] = 'test key facebook'
# ENV['OSEM_FACEBOOK_SECRET'] = 'test secret facebook'
# ENV['OSEM_SUSE_KEY'] = 'test key suse'
# ENV['OSEM_SUSE_SECRET'] = 'test secret suse'
# ENV['OSEM_GITHUB_KEY'] = 'test key github'
# ENV['OSEM_GITHUB_SECRET'] = 'test secret github'
def mock_auth_new_user
OmniAuth.config.mock_auth[:google] =