effective_test_bot 0.0.6 → 0.0.7
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/lib/effective_test_bot/version.rb +1 -1
- data/test/features/home_page_test.rb +9 -0
- data/test/models/user_test.rb +42 -0
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9fcb782d42810e22945e31a628388904113afc5
|
4
|
+
data.tar.gz: 646460eeb7f12195f8f178699ce9572ffd183900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8795f0ea8358bad1108443ef1422a6f0db4bc8e708390f2c3503807dbe44cde4dd7b2788c95e599417c820fa634b60b57f59f2b93c4c07ab221ab119893f4ba4
|
7
|
+
data.tar.gz: 8aa91d926c3b63aa2ca04a72f02266568239a860562cd9ca5727563f50a7719f45583a38ff1c3f987a359d75a9620b22346d780c92c35704e1eb30c8dd195363
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
if defined?(Devise) && defined?(User)
|
4
|
+
|
5
|
+
class UserTest < ActiveSupport::TestCase
|
6
|
+
#should validate_presence_of(:email)
|
7
|
+
#should validate_presence_of(:password)
|
8
|
+
#should validate_presence_of(:encrypted_password)
|
9
|
+
|
10
|
+
def user
|
11
|
+
User.new()
|
12
|
+
end
|
13
|
+
|
14
|
+
test "User fails validation when password and confirmation mismatch" do
|
15
|
+
user.password = '123456789'
|
16
|
+
user.password_confirmation = '987654321'
|
17
|
+
|
18
|
+
assert user.valid?, 'Test bot model yo!'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# require 'rails_helper'
|
25
|
+
|
26
|
+
# if defined?(Devise) && defined?(User)
|
27
|
+
|
28
|
+
# describe User, type: :model do
|
29
|
+
# let(:user) { User.new() }
|
30
|
+
|
31
|
+
# it { should validate_presence_of(:email) }
|
32
|
+
# it { should validate_presence_of(:password) }
|
33
|
+
# it { should validate_presence_of(:encrypted_password) }
|
34
|
+
|
35
|
+
# it 'fails validation when password and password_confirmation are different' do
|
36
|
+
# user.password = '123456789'
|
37
|
+
# user.password_confirmation = '987654321'
|
38
|
+
# expect(user.valid?).to eq false
|
39
|
+
# end
|
40
|
+
# end
|
41
|
+
|
42
|
+
# end # /defined?(Devise) && defined?(User)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_test_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
@@ -161,6 +161,8 @@ files:
|
|
161
161
|
- spec/features/devise/sign_up_spec.rb
|
162
162
|
- spec/features/home_page_spec.rb
|
163
163
|
- spec/models/user_spec.rb
|
164
|
+
- test/features/home_page_test.rb
|
165
|
+
- test/models/user_test.rb
|
164
166
|
homepage: https://github.com/code-and-effect/effective_test_bot
|
165
167
|
licenses:
|
166
168
|
- MIT
|
@@ -186,9 +188,4 @@ signing_key:
|
|
186
188
|
specification_version: 4
|
187
189
|
summary: A shared library of rails model & capybara-based feature tests that should
|
188
190
|
pass in every Rails application.
|
189
|
-
test_files:
|
190
|
-
- spec/features/crud/crud_spec.rb
|
191
|
-
- spec/features/devise/sign_in_spec.rb
|
192
|
-
- spec/features/devise/sign_up_spec.rb
|
193
|
-
- spec/features/home_page_spec.rb
|
194
|
-
- spec/models/user_spec.rb
|
191
|
+
test_files: []
|