rails_apps_testing 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.textile +4 -0
- data/lib/generators/testing/configure/templates/spec/omniauth/controllers/sessions_controller_spec.rb +2 -2
- data/lib/generators/testing/configure/templates/spec/omniauth/features/users/sign_in_spec.rb +4 -4
- data/lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb +1 -1
- data/lib/rails_apps_testing/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48da5c7f7615ef3eb48f568f3491dd929094be3b
|
4
|
+
data.tar.gz: 9cafe49a265735a5e61b830c4142167b331a87f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7179e400a5d31849fdb7b3998f420bf6d041ff0bb6a0a02874bc5c7a8124182ff05d36794b04ab469aa62d69671cb8d3a235d7f3a4aebfd3fedc3becd31b2166
|
7
|
+
data.tar.gz: fec36ba9d9108c9fd6f8679f8c486d333b277178ff6b638bcc83473c1b9051b63980d5548c241876dc85b12cc7f273e5d17395f77b9387993c4c999cbdf4b8aa
|
data/CHANGELOG.textile
CHANGED
@@ -13,7 +13,7 @@ describe SessionsController, :omniauth do
|
|
13
13
|
it "creates a session" do
|
14
14
|
expect(session[:user_id]).to be_nil
|
15
15
|
post :create, provider: :twitter
|
16
|
-
expect(session[:user_id]).
|
16
|
+
expect(session[:user_id]).not_to be_nil
|
17
17
|
end
|
18
18
|
|
19
19
|
it "redirects the user to the user profile" do
|
@@ -30,7 +30,7 @@ describe SessionsController, :omniauth do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
it "resets the session" do
|
33
|
-
session[:user_id].
|
33
|
+
expect(session[:user_id]).not_to be_nil
|
34
34
|
delete :destroy
|
35
35
|
expect(session[:user_id]).to be_nil
|
36
36
|
end
|
data/lib/generators/testing/configure/templates/spec/omniauth/features/users/sign_in_spec.rb
CHANGED
@@ -11,8 +11,8 @@ feature 'Sign in', :omniauth do
|
|
11
11
|
# Then I see a success message
|
12
12
|
scenario "user can sign in with valid account" do
|
13
13
|
signin
|
14
|
-
page.
|
15
|
-
page.
|
14
|
+
expect(page).to have_content("test@example.com")
|
15
|
+
expect(page).to have_content("Sign out")
|
16
16
|
end
|
17
17
|
|
18
18
|
# Scenario: User cannot sign in with invalid account
|
@@ -23,9 +23,9 @@ feature 'Sign in', :omniauth do
|
|
23
23
|
scenario 'user cannot sign in with invalid account' do
|
24
24
|
OmniAuth.config.mock_auth[:twitter] = :invalid_credentials
|
25
25
|
visit root_path
|
26
|
-
page.
|
26
|
+
expect(page).to have_content("Sign in")
|
27
27
|
click_link "Sign in"
|
28
|
-
page.
|
28
|
+
expect(page).to have_content('Authentication error')
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|