* fixing some broken tests
This commit is contained in:
parent
cc7bbf3f6a
commit
76e63193ca
|
|
@ -48,7 +48,7 @@ gem 'unf', '0.1.3' #optional fog dependency
|
|||
gem 'country-select'
|
||||
gem 'aasm', '3.0.16'
|
||||
gem 'postgres-copy', '0.6.0'
|
||||
gem 'aws-sdk', '1.29.1'
|
||||
gem 'aws-sdk' #, '1.29.1'
|
||||
gem 'bugsnag'
|
||||
gem 'gon'
|
||||
gem 'cocoon'
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ gem 'amqp', '1.0.2'
|
|||
gem 'will_paginate'
|
||||
gem 'actionmailer', '3.2.13'
|
||||
gem 'sendgrid', '1.2.0'
|
||||
gem 'aws-sdk', '1.29.1'
|
||||
gem 'aws-sdk' #, '1.29.1'
|
||||
gem 'carrierwave', '0.9.0'
|
||||
gem 'aasm', '3.0.16'
|
||||
gem 'devise', '>= 1.1.2'
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ FOO
|
|||
|
||||
def send_test_batch
|
||||
self.perform_event('do_test_run!')
|
||||
if 'test'==Rails.env
|
||||
if 'test' == Rails.env
|
||||
BatchMailer.send_batch_email_test(self.id).deliver!
|
||||
else
|
||||
BatchMailer.send_batch_email_test(self.id).deliver
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ describe RecordedTrack do
|
|||
describe "aws-based operations", :aws => true do
|
||||
|
||||
def put_file_to_aws(signed_data, contents)
|
||||
|
||||
begin
|
||||
RestClient.put( signed_data[:url],
|
||||
contents,
|
||||
{
|
||||
|
|
@ -76,6 +78,11 @@ describe RecordedTrack do
|
|||
:'Content-MD5' => signed_data[:md5],
|
||||
:Authorization => signed_data[:authorization]
|
||||
})
|
||||
rescue => e
|
||||
puts e.response
|
||||
raise e
|
||||
end
|
||||
|
||||
end
|
||||
# create a test file
|
||||
upload_file='some_file.ogg'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
|
||||
require 'simplecov'
|
||||
require 'support/utilities'
|
||||
require 'active_record'
|
||||
|
|
@ -28,13 +31,14 @@ require 'factories'
|
|||
|
||||
include JamRuby
|
||||
|
||||
|
||||
# manually register observers
|
||||
ActiveRecord::Base.add_observer InvitedUserObserver.instance
|
||||
ActiveRecord::Base.add_observer UserObserver.instance
|
||||
ActiveRecord::Base.add_observer FeedbackObserver.instance
|
||||
ActiveRecord::Base.add_observer RecordedTrackObserver.instance
|
||||
|
||||
RecordedTrack.observers.disable :all # only a few tests want this observer active
|
||||
#RecordedTrack.observers.disable :all # only a few tests want this observer active
|
||||
|
||||
# put ActionMailer into test mode
|
||||
ActionMailer::Base.delivery_method = :test
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@ JAMKAZAM_TESTING_BUCKET = 'jamkazam-testing' # cuz i'm not comfortable using aws
|
|||
|
||||
def app_config
|
||||
klass = Class.new do
|
||||
|
||||
def aws_bucket
|
||||
JAMKAZAM_TESTING_BUCKET
|
||||
JAMKAZAM_TESTING_BUCKET
|
||||
end
|
||||
|
||||
def aws_access_key_id
|
||||
|
|
@ -14,6 +15,18 @@ def app_config
|
|||
'h0V0ffr3JOp/UtgaGrRfAk25KHNiO9gm8Pj9m6v3'
|
||||
end
|
||||
|
||||
def aws_region
|
||||
'us-east-1'
|
||||
end
|
||||
|
||||
def aws_bucket_public
|
||||
'jamkazam-testing-public'
|
||||
end
|
||||
|
||||
def aws_cache
|
||||
'315576000'
|
||||
end
|
||||
|
||||
def audiomixer_path
|
||||
# you can specify full path to audiomixer with AUDIOMIXER_PATH env variable...
|
||||
# or we check for audiomixer path in the user's workspace
|
||||
|
|
@ -77,30 +90,6 @@ def app_config
|
|||
"#{external_protocol}#{external_hostname}#{(external_port == 80 || external_port == 443) ? '' : ':' + external_port.to_s}"
|
||||
end
|
||||
|
||||
def aws_access_key_id
|
||||
'AKIAJESQY24TOT542UHQ'
|
||||
end
|
||||
|
||||
def aws_secret_access_key
|
||||
'h0V0ffr3JOp/UtgaGrRfAk25KHNiO9gm8Pj9m6v3'
|
||||
end
|
||||
|
||||
def aws_region
|
||||
'us-east-1'
|
||||
end
|
||||
|
||||
def aws_bucket
|
||||
'jamkazam-testing'
|
||||
end
|
||||
|
||||
def aws_bucket_public
|
||||
'jamkazam-testing-public'
|
||||
end
|
||||
|
||||
def aws_cache
|
||||
'315576000'
|
||||
end
|
||||
|
||||
def max_audio_downloads
|
||||
100
|
||||
end
|
||||
|
|
@ -124,7 +113,7 @@ def app_config
|
|||
|
||||
end
|
||||
|
||||
return klass.new
|
||||
klass.new
|
||||
end
|
||||
|
||||
def run_tests? type
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ gem 'fb_graph', '2.5.9'
|
|||
gem 'sendgrid', '1.2.0'
|
||||
gem 'recaptcha', '0.3.4'
|
||||
gem 'filepicker-rails', '0.1.0'
|
||||
gem 'aws-sdk', '1.29.1'
|
||||
gem 'aws-sdk' #, '1.29.1'
|
||||
gem 'aasm', '3.0.16'
|
||||
gem 'carrierwave', '0.9.0'
|
||||
gem 'carrierwave_direct'
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ gem 'aasm', '3.0.16'
|
|||
gem 'carrierwave'
|
||||
gem 'devise'
|
||||
gem 'postgres-copy'
|
||||
gem 'aws-sdk', '1.29.1'
|
||||
gem 'aws-sdk' #, '1.29.1'
|
||||
gem 'bugsnag'
|
||||
gem 'postgres_ext'
|
||||
gem 'resque'
|
||||
|
|
|
|||
Loading…
Reference in New Issue