File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 622622 end
623623 end
624624 end
625+
626+ describe "GET #index" do
627+ let ( :user ) { create ( :user ) }
628+
629+ context "when logged in as the user viewing their work skins" do
630+ before { fake_login_known_user ( user ) }
631+
632+ it "sets the page subtitle with the username for work skins" do
633+ get :index , params : { user_id : user . login , skin_type : "WorkSkin" }
634+ expect ( assigns [ :page_subtitle ] ) . to eq ( "#{ user . login } - Work Skins" )
635+ end
636+
637+ it "sets the page subtitle with the username for site skins" do
638+ get :index , params : { user_id : user . login }
639+ expect ( assigns [ :page_subtitle ] ) . to eq ( "#{ user . login } - Site Skins" )
640+ end
641+ end
642+
643+ context "when logged out" do
644+ it "sets the page subtitle for public work skins" do
645+ get :index , params : { skin_type : "WorkSkin" }
646+ expect ( assigns [ :page_subtitle ] ) . to eq ( "Public Work Skins" )
647+ end
648+
649+ it "sets the page subtitle for public site skins" do
650+ get :index
651+ expect ( assigns [ :page_subtitle ] ) . to eq ( "Public Site Skins" )
652+ end
653+ end
654+ end
625655end
You can’t perform that action at this time.
0 commit comments