vrfs-774: fixed broken test; fixed bug editing distance text

This commit is contained in:
Jonathan Kolyer 2013-11-14 11:56:20 -06:00
parent 4e262de50a
commit a097fdbd98
4 changed files with 9 additions and 13 deletions

View File

@ -170,7 +170,7 @@ module JamRuby
counters = { }
counters[COUNT_FRIEND] = Friendship.where(:user_id => uu.id).count
counters[COUNT_FOLLOW] = UserFollowing.where(:user_id => uu.id).count
counters[COUNT_RECORD] = Recording.where(:owner_id => uu.id).count
counters[COUNT_RECORD] = ClaimedRecording.where(:user_id => uu.id).count
counters[COUNT_SESSION] = MusicSession.where(:user_id => uu.id).count
@user_counters[uu.id] << counters
end

View File

@ -66,7 +66,7 @@ describe User do
results = Search.musician_search({}, @user2)
friend = results.musicians.detect { |mm| mm.id == @user1.id }
friend.should_not == nil
friend.search_friend_count.to_i.should == 1
results.friend_count(friend).should == 1
@user1.reload
friend.friends?(@user2).should == true
results.is_friend?(@user1).should == true
@ -93,12 +93,12 @@ describe User do
recording.claimed_recordings.length.should == 1
@user1.recordings.detect { |rr| rr == recording }.should_not be nil
results = Search.musician_search
results = Search.musician_search({},@user1)
uu = results.musicians.detect { |mm| mm.id == @user1.id }
uu.should_not == nil
uu.search_recording_count.to_i.should == 1
uu.search_session_count.to_i.should == 1
results.record_count(uu).should == 1
results.session_count(uu).should == 1
end
it "should find all musicians sorted by plays " do

View File

@ -151,21 +151,17 @@
}
function events() {
$('#musician-keyword-srch').focus(function() {
$(this).val('');
});
$("#musician-keyword-srch").keypress(function(evt) {
$("#musician_query_distance").keypress(function(evt) {
if (evt.which === 13) {
evt.preventDefault();
search();
refreshDisplay();
}
});
$('#btn-refresh-musicians').on("click", refreshDisplay);
$('#musician-filter-results').bind('scroll', function() {
if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
logger.debug("*** scrolling: page_num="+page_num.toString()+" page_count="+page_count.toString());
// logger.debug("*** scrolling: page_num="+page_num.toString()+" page_count="+page_count.toString());
if (page_num < page_count) {
page_num += 1;
search();

View File

@ -51,7 +51,7 @@
{biography}<br />
<br />
<a href="{profile_url}" class="button-orange smallbutton m0">PROFILE</a><a href="{like_url}" class="button-orange smallbutton">LIKE</a><a href="{friend_url}" class="button-orange smallbutton m0 search-m-add-friend">FRIEND</a><a href="{follow_url}" class="button-orange smallbutton">FOLLOW</a></div>
<div class="left ml10 w20">
<div class="left ml10 w20" style='overflow:auto'>
<br />
<small><strong>FOLLOWING:</strong></small>
<table class="musicians" cellpadding="0" cellspacing="5">