spec/controllers/sessions_controller_spec.rb in authenticate-0.3.1 vs spec/controllers/sessions_controller_spec.rb in authenticate-0.3.2

- old
+ new

@@ -35,11 +35,11 @@ end end context 'with good password' do before do @user = create(:user) - post :create, session:{ email: @user.email, password: @user.password } + post :create, session: { email: @user.email, password: @user.password } end it { is_expected.to respond_with 302 } it { is_expected.to redirect_to Authenticate.configuration.redirect_url } @@ -61,10 +61,11 @@ get :destroy end it { is_expected.to redirect_to sign_in_url } end + context 'with a session cookie' do before do @user = create(:user, session_token: 'old-session-token') @request.cookies['authenticate_session_token'] = 'old-session-token' get :destroy @@ -80,7 +81,6 @@ it 'unset the current user' do expect(controller.current_user).to be_nil end end end - end