nyauth 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +70 -0
- data/app/controllers/nyauth/base_controller.rb +5 -0
- data/app/controllers/nyauth/confirmation_requests_controller.rb +1 -1
- data/app/controllers/nyauth/confirmations_controller.rb +1 -1
- data/app/controllers/nyauth/new_password_requests_controller.rb +1 -1
- data/app/controllers/nyauth/new_passwords_controller.rb +1 -1
- data/app/controllers/nyauth/passwords_controller.rb +1 -1
- data/app/controllers/nyauth/registrations_controller.rb +1 -1
- data/app/controllers/nyauth/sessions_controller.rb +1 -1
- data/app/helpers/nyauth/application_helper.rb +7 -0
- data/lib/nyauth/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +2485 -0
- data/spec/mailers/nyauth/user_mailer_spec.rb +15 -0
- data/spec/rails_helper.rb +2 -0
- metadata +4 -1
@@ -0,0 +1,15 @@
|
|
1
|
+
require "rails_helper"
|
2
|
+
|
3
|
+
RSpec.describe Nyauth::UserMailer do
|
4
|
+
describe '#request_confirmation' do
|
5
|
+
let(:user) { create(:user, :requested_confirmation) }
|
6
|
+
subject(:mail) { Nyauth::UserMailer.request_confirmation(user) }
|
7
|
+
it { expect(mail).to have_body_text 'Plese confirm your email' }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '#request_new_password' do
|
11
|
+
let(:user) { create(:user, :requested_new_password) }
|
12
|
+
subject(:mail) { Nyauth::UserMailer.request_new_password(user) }
|
13
|
+
it { expect(mail).to have_body_text 'Plese set your new password' }
|
14
|
+
end
|
15
|
+
end
|
data/spec/rails_helper.rb
CHANGED
@@ -22,6 +22,8 @@ RSpec.configure do |config|
|
|
22
22
|
config.include FactoryGirl::Syntax::Methods
|
23
23
|
config.include ControllerMacros, type: :controller
|
24
24
|
config.include FeatureMacros, type: :feature
|
25
|
+
config.include EmailSpec::Helpers, type: :mailer
|
26
|
+
config.include EmailSpec::Matchers, type: :mailer
|
25
27
|
|
26
28
|
config.before(:suite) do
|
27
29
|
DatabaseRewinder.clean
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ppworks
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- app/assets/javascripts/nyauth/application.js
|
94
94
|
- app/assets/stylesheets/nyauth/application.css
|
95
95
|
- app/controllers/concerns/nyauth/session_concern.rb
|
96
|
+
- app/controllers/nyauth/base_controller.rb
|
96
97
|
- app/controllers/nyauth/confirmation_requests_controller.rb
|
97
98
|
- app/controllers/nyauth/confirmations_controller.rb
|
98
99
|
- app/controllers/nyauth/new_password_requests_controller.rb
|
@@ -185,6 +186,7 @@ files:
|
|
185
186
|
- spec/featrues/nyauth/passwords_spec.rb
|
186
187
|
- spec/featrues/nyauth/registrations_spec.rb
|
187
188
|
- spec/featrues/nyauth/sessions_spec.rb
|
189
|
+
- spec/mailers/nyauth/user_mailer_spec.rb
|
188
190
|
- spec/models/user_spec.rb
|
189
191
|
- spec/rails_helper.rb
|
190
192
|
- spec/spec_helper.rb
|
@@ -268,6 +270,7 @@ test_files:
|
|
268
270
|
- spec/featrues/nyauth/passwords_spec.rb
|
269
271
|
- spec/featrues/nyauth/registrations_spec.rb
|
270
272
|
- spec/featrues/nyauth/sessions_spec.rb
|
273
|
+
- spec/mailers/nyauth/user_mailer_spec.rb
|
271
274
|
- spec/models/user_spec.rb
|
272
275
|
- spec/rails_helper.rb
|
273
276
|
- spec/spec_helper.rb
|