From de7cb2d6ab5d43660d2bed085152735aa028f0e2 Mon Sep 17 00:00:00 2001 From: Bert Owen Date: Wed, 11 Jun 2014 03:06:17 +0800 Subject: [PATCH] fix tests --- web/Gemfile | 2 +- web/app/assets/javascripts/bandProfile.js | 2 +- web/app/assets/javascripts/scheduled_session.js | 2 +- web/spec/features/in_session_spec.rb | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/Gemfile b/web/Gemfile index 5ac7dadc4..2c3d841d6 100644 --- a/web/Gemfile +++ b/web/Gemfile @@ -80,7 +80,7 @@ gem 'iso-639' gem 'language_list' group :development, :test do - gem 'rspec-rails', "2.99.0" + gem 'rspec-rails', "2.14.2" gem "activerecord-import", "~> 0.4.1" gem 'guard-rspec', '0.5.5' gem 'jasmine', '1.3.1' diff --git a/web/app/assets/javascripts/bandProfile.js b/web/app/assets/javascripts/bandProfile.js index 46ed0b72c..af7b3af3b 100644 --- a/web/app/assets/javascripts/bandProfile.js +++ b/web/app/assets/javascripts/bandProfile.js @@ -339,7 +339,7 @@ function bindMusicians(musicians, isPending) { $.each(musicians, function(index, musician) { var instrumentLogoHtml = ''; - if ("instruments" in musician) { + if ("instruments" in musician && musician.instruments != null) { for (var j=0; j < musician.instruments.length; j++) { var instrument = musician.instruments[j]; var inst = '../assets/content/icon_instrument_default24.png'; diff --git a/web/app/assets/javascripts/scheduled_session.js b/web/app/assets/javascripts/scheduled_session.js index 2c73a2f6e..91cfce508 100644 --- a/web/app/assets/javascripts/scheduled_session.js +++ b/web/app/assets/javascripts/scheduled_session.js @@ -662,6 +662,7 @@ } function afterShow() { + context.JK.guardAgainstBrowser(app); } function getFormattedTime(date, change) { @@ -749,7 +750,6 @@ context.JK.GenreSelectorHelper.render('#create-session-genre'); inviteMusiciansUtil.loadFriends(); - context.JK.guardAgainstBrowser(app); context.JK.dropdown($('#session-musician-access')); context.JK.dropdown($('#session-fans-access')); diff --git a/web/spec/features/in_session_spec.rb b/web/spec/features/in_session_spec.rb index 1be1b3cc1..2e57bacb5 100644 --- a/web/spec/features/in_session_spec.rb +++ b/web/spec/features/in_session_spec.rb @@ -14,7 +14,6 @@ describe "In a Session", :js => true, :type => :feature, :capybara_feature => tr before(:each) do UserMailer.deliveries.clear ActiveMusicSession.delete_all - FactoryGirl.create(:friendship, :user => user, :friend => finder) end