Skip to content

Commit

Permalink
Merge pull request #1144 from rubyforgood/rachelwyatt/1090-add-defaul…
Browse files Browse the repository at this point in the history
…t-casa-logo

1090 add default casa logo
  • Loading branch information
compwron committed Oct 21, 2020
2 parents 014e072 + 9e1450d commit 0ac81b1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/system/admin_views_volunteers_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
expect(page).to have_text("Miles Driven")
expect(page).to have_text("Want reimbursement?")
end

it "displays default logo" do
sign_in admin

visit volunteers_path

expect(page).to have_xpath("//img[@src = '/packs-test/media/src/images/default-logo-c9048fc43854499e952e4b62a505bf35.png' and @alt='CASA Logo']")
end
end

it "can show/hide columns on volunteers table" do
Expand Down
12 changes: 12 additions & 0 deletions spec/views/layouts/sidebar.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
assign :casa_org, user.casa_org
end

context "when no organization logo is set" do
let(:user) { build_stubbed :volunteer }

it "displays default logo" do
sign_in user

render partial: "layouts/sidebar"

expect(rendered).to have_xpath("//img[@src = '/packs-test/media/src/images/default-logo-c9048fc43854499e952e4b62a505bf35.png' and @alt='CASA Logo']")
end
end

context "when logged in as a supervisor" do
let(:user) { build_stubbed :supervisor }

Expand Down

0 comments on commit 0ac81b1

Please sign in to comment.