summaryrefslogtreecommitdiff
path: root/share/www/script/test/erlang_views.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/test/erlang_views.js')
-rw-r--r--share/www/script/test/erlang_views.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/share/www/script/test/erlang_views.js b/share/www/script/test/erlang_views.js
index e9e0363f..7eddab40 100644
--- a/share/www/script/test/erlang_views.js
+++ b/share/www/script/test/erlang_views.js
@@ -29,8 +29,8 @@ couchTests.erlang_views = function(debug) {
T(db.save(doc).ok);
var mfun = 'fun({Doc}) -> ' +
- ' K = proplists:get_value(<<"integer">>, Doc, null), ' +
- ' V = proplists:get_value(<<"string">>, Doc, null), ' +
+ ' K = couch_util:get_value(<<"integer">>, Doc, null), ' +
+ ' V = couch_util:get_value(<<"string">>, Doc, null), ' +
' Emit(K, V) ' +
'end.';
@@ -44,7 +44,7 @@ couchTests.erlang_views = function(debug) {
// check simple reduction - another doc with same key.
var doc = {_id: "2", integer: 1, string: "str2"};
T(db.save(doc).ok);
- rfun = "fun(Keys, Values, ReReduce) -> length(Values) end."
+ rfun = "fun(Keys, Values, ReReduce) -> length(Values) end.";
results = db.query(mfun, rfun, null, null, "erlang");
T(results.rows[0].value == 2);
@@ -55,9 +55,9 @@ couchTests.erlang_views = function(debug) {
shows: {
simple:
'fun(Doc, {Req}) -> ' +
- ' {Info} = proplists:get_value(<<"info">>, Req, {[]}), ' +
- ' Purged = proplists:get_value(<<"purge_seq">>, Info, -1), ' +
- ' Verb = proplists:get_value(<<"method">>, Req, <<"not_get">>), ' +
+ ' {Info} = couch_util:get_value(<<"info">>, Req, {[]}), ' +
+ ' Purged = couch_util:get_value(<<"purge_seq">>, Info, -1), ' +
+ ' Verb = couch_util:get_value(<<"method">>, Req, <<"not_get">>), ' +
' R = list_to_binary(io_lib:format("~b - ~s", [Purged, Verb])), ' +
' {[{<<"code">>, 200}, {<<"headers">>, {[]}}, {<<"body">>, R}]} ' +
'end.'
@@ -67,7 +67,7 @@ couchTests.erlang_views = function(debug) {
'fun(Head, {Req}) -> ' +
' Send(<<"head">>), ' +
' Fun = fun({Row}, _) -> ' +
- ' Val = proplists:get_value(<<"value">>, Row, -1), ' +
+ ' Val = couch_util:get_value(<<"value">>, Row, -1), ' +
' Send(list_to_binary(integer_to_list(Val))), ' +
' {ok, nil} ' +
' end, ' +
@@ -117,10 +117,10 @@ couchTests.erlang_views = function(debug) {
T(db.bulkSave(docs).length, 250, "Saved big doc set.");
var mfun = 'fun({Doc}) -> ' +
- 'Words = proplists:get_value(<<"words">>, Doc), ' +
+ 'Words = couch_util:get_value(<<"words">>, Doc), ' +
'lists:foreach(fun({Word}) -> ' +
- 'WordString = proplists:get_value(<<"word">>, Word), ' +
- 'Count = proplists:get_value(<<"count">>, Word), ' +
+ 'WordString = couch_util:get_value(<<"word">>, Word), ' +
+ 'Count = couch_util:get_value(<<"count">>, Word), ' +
'Emit(WordString , Count) ' +
'end, Words) ' +
'end.';