def test_diary_entry_validations
diary_entry_valid({})
diary_entry_valid({ :title => "" }, :valid => false)
- diary_entry_valid(:title => "a" * 255)
+ diary_entry_valid({ :title => "a" * 255 })
diary_entry_valid({ :title => "a" * 256 }, :valid => false)
diary_entry_valid({ :body => "" }, :valid => false)
- diary_entry_valid(:latitude => 90)
+ diary_entry_valid({ :latitude => 90 })
diary_entry_valid({ :latitude => 90.00001 }, :valid => false)
- diary_entry_valid(:latitude => -90)
+ diary_entry_valid({ :latitude => -90 })
diary_entry_valid({ :latitude => -90.00001 }, :valid => false)
- diary_entry_valid(:longitude => 180)
+ diary_entry_valid({ :longitude => 180 })
diary_entry_valid({ :longitude => 180.00001 }, :valid => false)
- diary_entry_valid(:longitude => -180)
+ diary_entry_valid({ :longitude => -180 })
diary_entry_valid({ :longitude => -180.00001 }, :valid => false)
end
def test_validations
trace_valid({})
trace_valid({ :user_id => nil }, :valid => false)
- trace_valid(:name => "a" * 255)
+ trace_valid({ :name => "a" * 255 })
trace_valid({ :name => "a" * 256 }, :valid => false)
trace_valid({ :description => nil }, :valid => false)
- trace_valid(:description => "a" * 255)
+ trace_valid({ :description => "a" * 255 })
trace_valid({ :description => "a" * 256 }, :valid => false)
- trace_valid(:visibility => "private")
- trace_valid(:visibility => "public")
- trace_valid(:visibility => "trackable")
- trace_valid(:visibility => "identifiable")
+ trace_valid({ :visibility => "private" })
+ trace_valid({ :visibility => "public" })
+ trace_valid({ :visibility => "trackable" })
+ trace_valid({ :visibility => "identifiable" })
trace_valid({ :visibility => "foo" }, :valid => false)
end
tracetag_valid({})
tracetag_valid({ :tag => nil }, :valid => false)
tracetag_valid({ :tag => "" }, :valid => false)
- tracetag_valid(:tag => "a")
- tracetag_valid(:tag => "a" * 255)
+ tracetag_valid({ :tag => "a" })
+ tracetag_valid({ :tag => "a" * 255 })
tracetag_valid({ :tag => "a" * 256 }, :valid => false)
tracetag_valid({ :tag => "a/b" }, :valid => false)
tracetag_valid({ :tag => "a;b" }, :valid => false)
request.sign!(oauth)
- method(method).call(request.signed_uri, options)
+ method(method).call(request.signed_uri, **options)
end
##