File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 112112 < ul class ="users-list clearfix ">
113113 <% @recent_organizations . each do |org | %>
114114 < li >
115- <%= image_tag ( org &.logo_path ) %>
115+ <%= image_tag ( org &.logo )
116+ %>
116117 <%= link_to org . name , admin_organization_path ( org ) , class : "users-list-name" %>
117118 < span class ="users-list-date "> <%= time_ago_in_words ( org . created_at ) %> </ span >
118119 </ li >
Original file line number Diff line number Diff line change 1- RSpec . feature "Dashboard" do
1+ RSpec . describe "Dashboard" , type : :system , js : true do
2+ subject { admin_dashboard_path }
3+
24 context "When the super admin user also has an organization assigned" do
35 before do
46 @super_admin . organization = @organization
57 @super_admin . save
68 sign_in ( @super_admin )
9+ visit subject
710 end
811
9- scenario "the side and top nav both have a link to return to their organization dashboard" do
10- visit admin_dashboard_path
12+ it "displays a link to return to their organization dashboard on both the side and top nav" do
1113 within "section.sidebar" do
1214 expect ( page ) . to have_xpath ( "//li/a[@href='#{ dashboard_path ( @organization . short_name ) } ']" )
1315 end
2224 @super_admin . organization = nil
2325 @super_admin . save
2426 sign_in ( @super_admin )
27+ visit subject
2528 end
2629
27- scenario "the side and top navs DO NOT have a link to the organization dashboard" do
28- visit admin_dashboard_path
30+ it "DOES NOT have a link to the organization dashboard in the side and top navs" do
2931 within "section.sidebar" do
3032 expect ( page ) . not_to have_xpath ( "//li/a[@href='#{ dashboard_path ( @organization . short_name ) } ']" )
3133 end
You can’t perform that action at this time.
0 commit comments