couple more passing cucumber stories, changed the queries on request and notification
This commit is contained in:
parent
4fec1bf717
commit
ddf95e2750
5 changed files with 5 additions and 5 deletions
|
|
@ -71,7 +71,7 @@ class UsersController < ApplicationController
|
|||
@person = @user.person
|
||||
@profile = @user.profile
|
||||
@services = @user.services
|
||||
@requests = Request.to(@person).all
|
||||
@requests = Request.where(:recipient_id => @person.id).all
|
||||
|
||||
@step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1
|
||||
@step ||= 1
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
- notes.each do |note|
|
||||
%li.message{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : ''}"}
|
||||
%span.from
|
||||
= link_to "#{note.person.name.titleize}", person_path(note.person)
|
||||
= link_to "#{note.actor.name.titleize}", person_path(note.actor)
|
||||
= object_link(note)
|
||||
|
||||
%span.time= "#{t('ago', :time => time_ago_in_words(note.created_at))}"
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@
|
|||
= link_to t('.new', :type => object.class.to_s, :from => object.person.name), object_path(object.post)
|
||||
|
||||
|
||||
= link_to "#{note.person.name.titelize}", person_path(note.person)
|
||||
= link_to "#{note.actor.name.titelize}", person_path(note.actor)
|
||||
= object_link(note)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ When /^I wait for the aspects page to load$/ do
|
|||
end
|
||||
|
||||
When /^I wait for the request's profile page to load$/ do
|
||||
wait_until { current_path == person_path(Request.where(:recipient_id => @me.id).first.sender) }
|
||||
wait_until { current_path == person_path(Request.where(:recipient_id => @me.person.id).first.sender) }
|
||||
end
|
||||
|
||||
When /^I wait for the ajax to finish$/ do
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ module NavigationHelpers
|
|||
when /^my acceptance form page$/
|
||||
accept_user_invitation_path(:invitation_token => @me.invitation_token)
|
||||
when /^the requestor's profile page$/
|
||||
person_path(Request.to(@me).first.from)
|
||||
person_path(Request.where(:recipient_id => @me.person.id).first.sender)
|
||||
when /^"([^\"]*)"'s page$/
|
||||
person_path(User.find_by_email($1).person)
|
||||
when /^"(\/.*)"/
|
||||
|
|
|
|||
Loading…
Reference in a new issue