Skip to content

Commit

Permalink
Correct name to assert_json_value in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Huning committed Jun 11, 2012
1 parent 411ec61 commit b49e1c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -257,20 +257,20 @@ otherwise.

#### assert_json_value

Assert that the body received with the response `Res` contains a JSON object, which under the key `Key` contains exactly `Val`, fail with `assert_json_val` otherwise.
Assert that the body received with the response `Res` contains a JSON object, which under the key `Key` contains exactly `Val`, fail with `assert_json_value` otherwise.

```erlang
% Test Macro.
?assert_json_val(Key, Val, Res).
?assert_json_value(Key, Val, Res).

% Test Generator Macro.
?assert_json_val(Key, Val, Res).
?assert_json_value(Key, Val, Res).

% Key = binary() | [binary()]
% Val = atom() | binary() | list() | integer() | float() | {list()}

% Examples:
?assert_json_val(<<"message">>, <<"Hello World">>, Res).
?assert_json_val(<<"should_reload">>, true, Res).
?assert_json_val([<<"messages">>, <<"de">>], <<"Hallo Welt">>, Res).
?assert_json_value(<<"message">>, <<"Hello World">>, Res).
?assert_json_value(<<"should_reload">>, true, Res).
?assert_json_value([<<"messages">>, <<"de">>], <<"Hallo Welt">>, Res).
```

0 comments on commit b49e1c7

Please sign in to comment.