Skip to content

Commit

Permalink
update test to check for nil instead of empty starting
Browse files Browse the repository at this point in the history
before we were setting title as en empty string, but we think it's safer
to set it as nil (inside the parser)

if title is nil (or an empty string) it will be set as the url inside
Media.as_json
  • Loading branch information
vasconsaurus committed Sep 4, 2023
1 parent 6380612 commit 2eb3e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/models/parser/facebook_profile_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def throwaway_url

assert_equal Lapis::ErrorCodes::const_get('LOGIN_REQUIRED'), data[:error][:code]
assert_match /Login required/, data[:error][:message]
assert data['title'].empty?
assert data['title'].nil?
assert data['description'].empty?
end

Expand All @@ -162,7 +162,7 @@ def throwaway_url

assert_equal Lapis::ErrorCodes::const_get('LOGIN_REQUIRED'), data[:error][:code]
assert_match /Login required/, data[:error][:message]
assert data['title'].empty?
assert data['title'].nil?
assert data['description'].empty?
end

Expand Down

0 comments on commit 2eb3e55

Please sign in to comment.