spec/features/auth/log_out_spec.rb in archangel-0.3.0 vs spec/features/auth/log_out_spec.rb in archangel-0.4.0
- old
+ new
@@ -1,18 +1,25 @@
# frozen_string_literal: true
require "rails_helper"
-RSpec.feature "Auth log out", type: :feature do
+RSpec.describe "Auth log out", type: :feature do
describe "while logged in" do
before { stub_authorization! }
- it "has additional form fields" do
- visit archangel.backend_root_path
+ it "signs out successfully" do
+ visit "/backend"
click_link "Log Out"
expect(page).to have_content "Signed out successfully"
- expect(current_path).to eq(archangel.new_user_session_path)
+ end
+
+ it "signs out and redirects to login page" do
+ visit "/backend"
+
+ click_link "Log Out"
+
+ expect(page).to have_current_path("/account/login")
end
end
end