move-to-go 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/move-to-go/model/coworker.rb +0 -5
- data/spec/coworker_spec.rb +5 -21
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f87f9f21453dd23fe598edc61a1070ab12c9f1a3
|
4
|
+
data.tar.gz: 6906165abe6583bd4829cc941473d1b32682bf1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6284ca8b72a79386e4818457631bb5b82b939ccbbab2e3155cfab54ebfe04a4e445c28496c59d2cff818f27cc494765171ffc30850adad0ef483d2562a0850af
|
7
|
+
data.tar.gz: 7327f192a0aa81329bbbc2bb228a8ddbb99ec9a409264635a2a6a733590a4d0c31a0a2245f52a57db2e0bb459b4ce9a1265d0c8a1e35d66226f9db5bff39b157
|
@@ -84,13 +84,8 @@ module MoveToGo
|
|
84
84
|
(@last_name.nil? || @last_name.empty?)
|
85
85
|
error = "A firstname or lastname is required for coworker.\n#{serialize()}"
|
86
86
|
end
|
87
|
-
|
88
|
-
if @email.nil? || @email.empty?
|
89
|
-
error = "#{error}\nAn email is required for coworker.\n"
|
90
|
-
end
|
91
87
|
|
92
88
|
return error
|
93
89
|
end
|
94
|
-
|
95
90
|
end
|
96
91
|
end
|
data/spec/coworker_spec.rb
CHANGED
@@ -7,39 +7,23 @@ describe "Coworker" do
|
|
7
7
|
}
|
8
8
|
|
9
9
|
describe "coworker" do
|
10
|
-
it "must have a first name
|
10
|
+
it "must have a first name if no last name" do
|
11
11
|
# given
|
12
12
|
coworker.first_name = "billy"
|
13
|
-
coworker.
|
13
|
+
coworker.last_name = ""
|
14
14
|
|
15
15
|
# when, then
|
16
16
|
coworker.validate.should eq ""
|
17
17
|
end
|
18
18
|
|
19
|
-
it "must have a last name
|
19
|
+
it "must have a last name if no first name" do
|
20
20
|
# given
|
21
|
-
coworker.first_name = "
|
22
|
-
coworker.
|
21
|
+
coworker.first_name = ""
|
22
|
+
coworker.last_name = "bob"
|
23
23
|
|
24
24
|
# when, then
|
25
25
|
coworker.validate.should eq ""
|
26
26
|
end
|
27
|
-
|
28
|
-
it "must have either first or last name and email" do
|
29
|
-
# given
|
30
|
-
coworker.email = "billy@movetogo.com"
|
31
|
-
|
32
|
-
# when, then
|
33
|
-
coworker.validate.length.should > 1
|
34
|
-
end
|
35
|
-
|
36
|
-
it "must have email" do
|
37
|
-
# given
|
38
|
-
coworker.first_name = "billy"
|
39
|
-
|
40
|
-
# when, then
|
41
|
-
coworker.validate.length.should > 1
|
42
|
-
end
|
43
27
|
end
|
44
28
|
|
45
29
|
describe "parse_name_to_firstname_lastname_se" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: move-to-go
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Petter Sandholdt
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2016-
|
16
|
+
date: 2016-09-14 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: iso_country_codes
|