mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Adapt the spec
This commit is contained in:
parent
86896cc46b
commit
8fc57e34c9
7 changed files with 16 additions and 12 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
CarrierWave.configure do |config|
|
CarrierWave.configure do |config|
|
||||||
config.storage = :file
|
config.storage = :file
|
||||||
config.cache_dir = "#{Rails.root}/tmp/uploads"
|
config.cache_dir = "#{Rails.root}/tmp/uploads"
|
||||||
|
config.enable_processing = false if Rails.env.test?
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,14 @@ FactoryGirl.define do
|
||||||
name 'Example sponsor'
|
name 'Example sponsor'
|
||||||
website_url 'http://www.example.com'
|
website_url 'http://www.example.com'
|
||||||
description 'Lorem Ipsum Dolor'
|
description 'Lorem Ipsum Dolor'
|
||||||
logo_file_name 'rails.jpg'
|
|
||||||
logo_file_size 2000
|
|
||||||
logo_content_type 'image/jpeg'
|
|
||||||
logo_updated_at DateTime.current
|
|
||||||
sponsorship_level
|
sponsorship_level
|
||||||
conference
|
conference
|
||||||
|
|
||||||
|
after(:create) do |sponsor|
|
||||||
|
uploader = PictureUploader.new(sponsor, :picture)
|
||||||
|
File.open('app/assets/images/rails.png') { |f| uploader.store!(f) }
|
||||||
|
sponsor.logo_file_name = 'rails.png'
|
||||||
|
sponsor.save
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ feature Lodging do
|
||||||
|
|
||||||
fill_in 'lodging_name', with: 'New lodging'
|
fill_in 'lodging_name', with: 'New lodging'
|
||||||
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
|
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
|
||||||
attach_file 'Photo', path
|
attach_file 'Picture', path
|
||||||
|
|
||||||
click_button 'Create Lodging'
|
click_button 'Create Lodging'
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@ feature Lodging do
|
||||||
|
|
||||||
fill_in 'lodging_name', with: 'New lodging'
|
fill_in 'lodging_name', with: 'New lodging'
|
||||||
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
|
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
|
||||||
attach_file 'Photo', path
|
attach_file 'Picture', path
|
||||||
|
|
||||||
click_button 'Update Lodging'
|
click_button 'Update Lodging'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ feature Sponsor do
|
||||||
|
|
||||||
fill_in 'sponsor_name', with: 'SUSE'
|
fill_in 'sponsor_name', with: 'SUSE'
|
||||||
fill_in 'sponsor_description', with: 'The original provider of the enterprise Linux distribution'
|
fill_in 'sponsor_description', with: 'The original provider of the enterprise Linux distribution'
|
||||||
attach_file 'Logo', path
|
attach_file 'Picture', path
|
||||||
fill_in 'sponsor_website_url', with: 'http://www.suse.com'
|
fill_in 'sponsor_website_url', with: 'http://www.suse.com'
|
||||||
select('Platin', from: 'sponsor_sponsorship_level_id')
|
select('Platin', from: 'sponsor_sponsorship_level_id')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ describe SponsorsHelper, type: :helper do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns correct url' do
|
it 'returns correct url' do
|
||||||
expect(get_logo(sponsor)).to match %r{.*(\bfirst/rails.jpg\b)}
|
expect(get_logo(sponsor)).to match %r{.*(\bfirst/rails.png\b)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ describe SponsorsHelper, type: :helper do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns correct url' do
|
it 'returns correct url' do
|
||||||
expect(get_logo(sponsor)).to match %r{.*(\bsecond/rails.jpg\b)}
|
expect(get_logo(sponsor)).to match %r{.*(\bsecond/rails.png\b)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ describe SponsorsHelper, type: :helper do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns correct url' do
|
it 'returns correct url' do
|
||||||
expect(get_logo(sponsor)).to match %r{.*(\bothers/rails.jpg\b)}
|
expect(get_logo(sponsor)).to match %r{.*(\bothers/rails.png\b)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ describe ConferenceSerializer, type: :serializer do
|
||||||
description: 'Lorem ipsum dolor sit',
|
description: 'Lorem ipsum dolor sit',
|
||||||
start_date: '2014-03-04',
|
start_date: '2014-03-04',
|
||||||
end_date: '2014-03-10',
|
end_date: '2014-03-10',
|
||||||
logo: '/logos/original/missing.png',
|
picture_url: nil,
|
||||||
difficulty_levels:
|
difficulty_levels:
|
||||||
[{id: 1,
|
[{id: 1,
|
||||||
title: 'Easy',
|
title: 'Easy',
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ describe 'conference/show.html.haml' do
|
||||||
expect(rendered).to match(/example@example.com/)
|
expect(rendered).to match(/example@example.com/)
|
||||||
expect(rendered).to match(/www.example.com/)
|
expect(rendered).to match(/www.example.com/)
|
||||||
expect(rendered).to match(/Lorem Ipsum Dolor/)
|
expect(rendered).to match(/Lorem Ipsum Dolor/)
|
||||||
expect(rendered).to match(/rails.jpg/)
|
expect(rendered).to match(/rails.png/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders social media partial' do
|
it 'renders social media partial' do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue