blob: 20440a134e0fa77950212f909730c8e532005204 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 | require 'spec_helper'
# Feature: Sign in
#   As a user
#   I want to sign in
#   So I can visit protected areas of the site
feature 'Sign in', :devise do
  # Scenario: User cannot sign in if not registered
  #   Given I do not exist as a user
  #   When I sign in with valid credentials
  #   Then I see an invalid credentials message
  # FIXME #816
  # scenario 'user cannot sign in if not registered' do
  #   signin('test@example.com', 'please123')
  #   expect(page).to have_content I18n.t 'devise.failure.not_found_in_database', authentication_keys: 'email'
  # end
  # Scenario: User can sign in with valid credentials
  #   Given I exist as a user
  #   And I am not signed in
  #   When I sign in with valid credentials
  #   Then I see a success message
  # FIXME #816
  # scenario 'user can sign in with valid credentials' do
  #   user = create(:user)
  #   user.confirm!
  #   signin(user.email, user.password)
  #   expect(page).to have_content I18n.t 'devise.sessions.signed_in'
  # end
  # Scenario: User cannot sign in with wrong email
  #   Given I exist as a user
  #   And I am not signed in
  #   When I sign in with a wrong email
  #   Then I see an invalid email message
  # scenario 'user cannot sign in with wrong email' do
  #   user = create(:user)
  #   user.confirm!
  #   signin('invalid@email.com', user.password)
  #   expect(page).to have_content I18n.t 'devise.failure.not_found_in_database', authentication_keys: 'email'
  # end
  # Scenario: User cannot sign in with wrong password
  #   Given I exist as a user
  #   And I am not signed in
  #   When I sign in with a wrong password
  #   Then I see an invalid password message
  # FIXME #816
  # scenario 'user cannot sign in with wrong password' do
  #   user = create(:user)
  #   user.confirm!
  #   signin(user.email, 'invalidpass')
  #   expect(page).to have_content I18n.t 'devise.failure.invalid', authentication_keys: 'email'
  # end
end
 |