Skip to content

Commit

Permalink
Fix typo in Bernard's approved_applicant in shelter index setup
Browse files Browse the repository at this point in the history
  • Loading branch information
leahriffell committed Sep 2, 2020
1 parent a93e7e7 commit 88e4d58
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/views/pets/_info.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<li><span class="li-label">Shelter: </span><a href="/shelters/<%= pet.shelter.id %>"><%= pet.shelter.name %></a></li>
<li><span class="li-label">Adoption status: </span><%= pet.adoption_status %></li>
<% if pet.has_approved_applicant %>
<li class="explanation">On hold for <a href="/applications/<%= pet.find_approved_application.id%>"><%= pet.approved_applicant %></a></li>
<li class="explanation">On hold for <a href="/applications/<%= pet.find_approved_application.id %>"><%= pet.approved_applicant %></a></li>
<% end %>
</ul>
25 changes: 12 additions & 13 deletions spec/features/shelters/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
sex: "Male",
shelter_id: @shelter_2.id,
adoption_status: "Pending",
approved_applicant: "Paul Bunyan"
approved_applicant: "Dani Coleman"
)

@application = @pet_2.applications.create!(
Expand Down Expand Up @@ -89,20 +89,19 @@
end

it "can delete all pets at shelter when shelter is deleted" do
@pet_1 = @shelter_1.pets.create!(
image: "http://3.bp.blogspot.com/-72agMABPgDw/Tx-76OX1SWI/AAAAAAAAAB4/OYmSC3j-4S8/s400/5.jpg",
name: "Fluffy",
approximate_age: "15 weeks",
sex: "Female",
description: "I am fluffy and so cute. I need someone to be my friend forever!!",
adoption_status: "Adoptable",
approved_applicant: nil
)

visit "/shelters"

within("#shelter-#{@shelter_1.id}") do
@pet_1 = @shelter_1.pets.create!(
image: "http://3.bp.blogspot.com/-72agMABPgDw/Tx-76OX1SWI/AAAAAAAAAB4/OYmSC3j-4S8/s400/5.jpg",
name: "Fluffy",
approximate_age: "15 weeks",
sex: "Female",
description: "I am fluffy and so cute. I need someone to be my friend forever!!",
adoption_status: "Adoptable",
approved_applicant: nil
)
click_link "Delete Shelter"
end
click_link "Delete Shelter"
visit "/pets"
expect(page).to have_no_content(@pet_1.name)
end
Expand Down

0 comments on commit 88e4d58

Please sign in to comment.