File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 44 < div class ="sidebar-header position-relative ">
55 < div class ="d-flex justify-content-between align-items-center ">
66 < div class ="logo ">
7- < a href =" index.html " > Logo </ a >
7+ <%= link_to ( "SkillRx" , root_path ) % >
88 </ div >
99 < div class ="theme-toggle d-flex gap-2 align-items-center mt-2 ">
1010 < svg xmlns ="http://www.w3.org/2000/svg " xmlns:xlink ="http://www.w3.org/1999/xlink " aria-hidden ="true "
3838 < a href ="# " class ="sidebar-hide d-xl-none d-block "> < i class ="bi bi-x bi-middle "> </ i > </ a >
3939 </ div >
4040 </ div >
41+ <%= button_to session_path , method : :delete , class : "btn btn-danger mt-2" do %>
42+ < i class ="bi bi-box-arrow-right "> </ i > Log out
43+ <% end %>
4144 </ div >
4245
4346 < div class ="sidebar-menu ">
Original file line number Diff line number Diff line change 3434 expect ( page ) . to have_link ( "Login" , href : new_session_path )
3535 end
3636 end
37+
38+ context "after logging in" do
39+ it "allows users to log out" do
40+ visit new_session_path
41+ fill_in "email" , with : user . email
42+ fill_in "password" , with : user . password
43+ click_button ( "Sign in" )
44+ click_button ( "Log out" )
45+ expect ( page ) . to have_button ( "Sign in" )
46+ end
47+ end
3748end
You can’t perform that action at this time.
0 commit comments