test_that_json v0.1.0 TestThatJson.Json
Summary
Functions
Receives a subject and a value and returns whether they are equal
Receives a subject and a value and returns whether the subject has all keys specified by the value
Receives a subject and a value and returns whether the subject contains only the keys specified by the value
Receives a subject and a value and returns whether the subject contains only the properties (or key value pairs) specified by the value
Receives a subject and a value and returns whether the subject contains only the values specified by the value
Receives a subject and a path and returns whether the path exists within the subject
Receives a subject and a value and returns whether the subject contains the properties (or key value pairs) specified by the value
Receives a subject and a value and returns whether the subject contains the values specified by the value
Types
Functions
Specs
equals?(json_value, json_value) :: boolean
Receives a subject and a value and returns whether they are equal.
Specs
has_keys?(json_object, json_array | json_string) :: boolean
Receives a subject and a value and returns whether the subject has all keys specified by the value.
Specs
has_only_keys?(json_object, json_array | json_string) :: boolean
Receives a subject and a value and returns whether the subject contains only the keys specified by the value.
Specs
has_only_properties?(json_object, json_object) :: boolean
Receives a subject and a value and returns whether the subject contains only the properties (or key value pairs) specified by the value.
Specs
has_only_values?(json_value, json_value) :: boolean
Receives a subject and a value and returns whether the subject contains only the values specified by the value.
Specs
has_path?(json_object | json_array, String.t) :: boolean
Receives a subject and a path and returns whether the path exists within the subject.
Specs
has_properties?(json_object, json_object) :: boolean
Receives a subject and a value and returns whether the subject contains the properties (or key value pairs) specified by the value.
Specs
has_values?(json_value, json_value) :: boolean
Receives a subject and a value and returns whether the subject contains the values specified by the value.
If the value is a list, returns whether all values in the list are in the subject.
If the value is a JSON array as a String.t
, it is not treated the same as
a list. Instead, returns whether that list itself is one of the values in the subject.