Sha256: 9cf911d2e650a00ec06f15f3ef877b044d3c7280fcbb9ace9dd0d39c2c2d1f2b
Contents?: true
Size: 1.07 KB
Versions: 8
Compression:
Stored size: 1.07 KB
Contents
# frozen_string_literal: true require 'spec_helper' describe "spree/admin/shared/_navigation_footer", type: :view do let(:user) { FactoryBot.build_stubbed(:admin_user) } before do allow(view).to receive(:try_spree_current_user).and_return(user) end it "has a a login-nav section" do render expect(rendered).to have_selector("#login-nav") end it "has a user-account-link" do render expect(rendered).to have_link(user.email, href: Spree::Core::Engine.routes.url_helpers.edit_admin_user_path(user)) end context "with a required spree_logout_path helper" do before do allow(view).to receive(:spree_logout_path).and_return("/logout") end it "has user-logout-link" do render expect(rendered).to have_link(I18n.t('spree.logout'), href: "/logout") end end context "with a spree.root_path" do before do allow(view.spree).to receive("root_path").and_return("/") end it "has a back to store link" do render expect(rendered).to have_link(I18n.t('spree.back_to_store'), href: "/") end end end
Version data entries
8 entries across 8 versions & 1 rubygems