* VRFS-1987 fix stupid typo caused by refactor of MusicSession to ActiveMusicSession

This commit is contained in:
Seth Call 2014-07-29 21:42:35 -05:00
parent 525a2b298b
commit 9013ff2e94
3 changed files with 19 additions and 2 deletions

View File

@ -409,7 +409,7 @@ module JamRuby
end
def has_mount?
active_music_session && active_music_session.mount
!active_music_session.nil? && !active_music_session.mount.nil?
end
def can_cancel? user

View File

@ -60,7 +60,7 @@ glue :music_session do
attributes :id, :name, :location, :photo_url
}
child(:active_music_session => :music_session) do
child(:active_music_session => :active_music_session) do
# only show mount info if fan_access is public. Eventually we'll also need to show this in other scenarios, like if invited
child({:mount => :mount}, :if => lambda { |music_session| music_session.fan_access}) {
attributes :id, :name, :sourced, :listeners, :bitrate, :subtype, :url

View File

@ -10,6 +10,22 @@ describe "Feed", :js => true, :type => :feature, :capybara_feature => true do
end
describe "regressions" do
describe "mount" do
it "should render when has mount" do
# regression for VRFS-1987
ams = FactoryGirl.create(:active_music_session)
FactoryGirl.create(:icecast_mount, music_session_id: ams.id)
fast_signin user, "/client#/feed"
find('#feedScreen')
find(".feed-entry.music-session-history-entry[data-music-session='#{ams.id}']")
end
end
end
describe "sessions" do
before(:each) do
@ -40,6 +56,7 @@ describe "Feed", :js => true, :type => :feature, :capybara_feature => true do
# it " and render artist hover bubble"
# end
it "should render stats" do
visit "/client#/feed"