Skip to content

Commit

Permalink
Fixed sporadically failing specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyken committed Aug 27, 2014
1 parent fed1c51 commit e3948f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/shared/models.rb
Expand Up @@ -11,31 +11,31 @@
# User/assignee for the second record has no first/last name.
exported.size.should == 2
if exported[0].respond_to?(:user_id)
exported[0].user_id_full_name.should == "#{exported[0].user.first_name} #{exported[0].user.last_name}"
exported[1].user_id_full_name.should == "#{exported[1].user.email}"
exported[0].user_id_full_name.should == exported[0].user.full_name
exported[1].user_id_full_name.should == exported[1].user.email
end

if exported[0].respond_to?(:assigned_to)
if exported[0].assigned_to?
exported[0].assigned_to_full_name.should == "#{exported[0].assignee.first_name} #{exported[0].assignee.last_name}"
exported[0].assigned_to_full_name.should == exported[0].assignee.full_name
else
exported[0].assigned_to_full_name.should == ''
end
if exported[1].assigned_to?
exported[1].assigned_to_full_name.should == "#{exported[1].assignee.email}"
exported[1].assigned_to_full_name.should == exported[1].assignee.email
else
exported[1].assigned_to_full_name.should == ''
end
end

if exported[0].respond_to?(:completed_by)
if exported[0].completed_by?
exported[0].completed_by_full_name.should == "#{exported[0].completor.first_name} #{exported[0].completor.last_name}"
exported[0].completed_by_full_name.should == exported[0].completor.full_name
else
exported[0].completed_by_full_name.should == ''
end
if exported[1].completed_by?
exported[1].completed_by_full_name.should == "#{exported[1].completor.email}"
exported[1].completed_by_full_name.should == exported[1].completor.email
else
exported[1].completed_by_full_name.should == ''
end
Expand Down

0 comments on commit e3948f4

Please sign in to comment.