Skip to content

Commit

Permalink
#3 - Removed useless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarrega committed Oct 19, 2020
1 parent 327547b commit e823e83
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
lemonway-ruby (1.0.1)
lemonway-ruby (1.0.3)
json (~> 2.1, >= 2.1.0)
typhoeus (~> 1.0, >= 1.0.1)

Expand All @@ -15,9 +15,9 @@ GEM
diff-lcs (1.3)
ethon (0.12.0)
ffi (>= 1.3.0)
ffi (1.12.2)
ffi (1.13.1)
hashdiff (1.0.0)
json (2.3.0)
json (2.3.1)
public_suffix (4.0.3)
rake (13.0.1)
rspec (3.9.0)
Expand All @@ -34,7 +34,7 @@ GEM
rspec-support (~> 3.9.0)
rspec-support (3.9.2)
safe_yaml (1.0.5)
typhoeus (1.3.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
vcr (3.0.3)
webmock (1.24.6)
Expand All @@ -53,4 +53,4 @@ DEPENDENCIES
webmock (~> 1.24, >= 1.24.3)

BUNDLED WITH
2.0.1
2.1.4
56 changes: 28 additions & 28 deletions lib/lemonway-ruby/models/company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,67 +75,67 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @name.nil?
invalid_properties.push('invalid value for "name", name cannot be nil.')
end
# if @name.nil?
# invalid_properties.push('invalid value for "name", name cannot be nil.')
# end

if @name.to_s.length > 256
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 256.')
end

if @name.to_s.length < 1
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
end
# if @name.to_s.length < 1
# invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
# end

if @description.nil?
invalid_properties.push('invalid value for "description", description cannot be nil.')
end
# if @description.nil?
# invalid_properties.push('invalid value for "description", description cannot be nil.')
# end

if @description.to_s.length > 256
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 256.')
end

if @description.to_s.length < 1
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
end
# if @description.to_s.length < 1
# invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
# end

if @website_url.nil?
invalid_properties.push('invalid value for "website_url", website_url cannot be nil.')
end
# if @website_url.nil?
# invalid_properties.push('invalid value for "website_url", website_url cannot be nil.')
# end

if @website_url.to_s.length > 256
invalid_properties.push('invalid value for "website_url", the character length must be smaller than or equal to 256.')
end

if @website_url.to_s.length < 1
invalid_properties.push('invalid value for "website_url", the character length must be great than or equal to 1.')
end
# if @website_url.to_s.length < 1
# invalid_properties.push('invalid value for "website_url", the character length must be great than or equal to 1.')
# end

if !@identification_number.nil? && @identification_number.to_s.length > 256
invalid_properties.push('invalid value for "identification_number", the character length must be smaller than or equal to 256.')
end

if !@identification_number.nil? && @identification_number.to_s.length < 1
invalid_properties.push('invalid value for "identification_number", the character length must be great than or equal to 1.')
end
# if !@identification_number.nil? && @identification_number.to_s.length < 1
# invalid_properties.push('invalid value for "identification_number", the character length must be great than or equal to 1.')
# end

invalid_properties
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @name.nil?
# return false if @name.nil?
return false if @name.to_s.length > 256
return false if @name.to_s.length < 1
return false if @description.nil?
# return false if @name.to_s.length < 1
# return false if @description.nil?
return false if @description.to_s.length > 256
return false if @description.to_s.length < 1
return false if @website_url.nil?
# return false if @description.to_s.length < 1
# return false if @website_url.nil?
return false if @website_url.to_s.length > 256
return false if @website_url.to_s.length < 1
# return false if @website_url.to_s.length < 1
return false if !@identification_number.nil? && @identification_number.to_s.length > 256
return false if !@identification_number.nil? && @identification_number.to_s.length < 1
# return false if !@identification_number.nil? && @identification_number.to_s.length < 1
true
end

Expand Down
2 changes: 1 addition & 1 deletion lib/lemonway-ruby/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module LemonWayClient
VERSION = '1.0.3'
VERSION = '1.0.4'
end

0 comments on commit e823e83

Please sign in to comment.