Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

test: remove warnings about quoted keywords #29

Merged
merged 1 commit into from Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/arkecosystem/client/one/accounts_test.exs
Expand Up @@ -18,15 +18,15 @@ defmodule ArkEcosystem.Client.API.One.AccountsTest do
%{method: :get, url: "http://127.0.0.1:8443/api/accounts/delegates/fee"} ->
json(%{"success" => true, "fee" => 2500000000})
%{method: :get, url: "http://127.0.0.1:8443/api/accounts/delegates", query: [address: "dummy"]} ->
json(%{"success" => true, "delegates" => [%{"username" => "dummy"}]})
json(%{"success" => true, "delegates" => [%{username: "dummy"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/accounts", query: [address: "dummy"]} ->
json(%{"success" => true, "account" => %{"address" => "dummy"}})
json(%{"success" => true, "account" => %{address: "dummy"}})
%{method: :get, url: "http://127.0.0.1:8443/api/accounts/count"} ->
json(%{"success" => true, "count" => 42})
%{method: :get, url: "http://127.0.0.1:8443/api/accounts/getAllAccounts"} ->
json(%{"success" => true, "accounts" => [%{"address" => "dummy"}]})
json(%{"success" => true, "accounts" => [%{address: "dummy"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/accounts/top"} ->
json(%{"success" => true, "wallets" => [%{"address" => "dummy"}]})
json(%{"success" => true, "wallets" => [%{address: "dummy"}]})
end
:ok
end
Expand Down
8 changes: 4 additions & 4 deletions test/arkecosystem/client/one/blocks_test.exs
Expand Up @@ -14,9 +14,9 @@ defmodule ArkEcosystem.Client.One.BlocksTest do
#%{method: :get, url: "http://127.0.0.1:8443/api/blocks/get", query: [id: "dummy"]} ->
# json(%{"success" => true, "block" => %{"id" = "dummy"}})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks"} ->
json(%{"success" => true, "blocks" => [%{"id" => "dummy"}]})
json(%{"success" => true, "blocks" => [%{id: "dummy"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/get"} ->
json(%{"success" => true, "block" => %{"id" => "dummy"}})
json(%{"success" => true, "block" => %{id: "dummy"}})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getEpoch"} ->
json(%{"success" => true, "epoch" => "dummy::TimeZ"})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getHeight"} ->
Expand All @@ -26,15 +26,15 @@ defmodule ArkEcosystem.Client.One.BlocksTest do
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getFee"} ->
json(%{"success" => true, "fee" => "dummyFee"})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getFees"} ->
json(%{"success" => true, "fees" => %{"send": "dummyFee"}})
json(%{"success" => true, "fees" => %{send: "dummyFee"}})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getMilestone"} ->
json(%{"success" => true, "milestone" => 1})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getReward"} ->
json(%{"success" => true, "reward" => 1})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getSupply"} ->
json(%{"success" => true, "supply" => 42})
%{method: :get, url: "http://127.0.0.1:8443/api/blocks/getStatus"} ->
json(%{"success" => true, "epoch" => "dummy::TimeZ", "supply": 42})
json(%{"success" => true, "epoch" => "dummy::TimeZ", supply: 42})
end
:ok
end
Expand Down
8 changes: 4 additions & 4 deletions test/arkecosystem/client/one/delegates_test.exs
Expand Up @@ -14,13 +14,13 @@ defmodule ArkEcosystem.Client.One.DelegatesTest do
%{method: :get, url: "http://127.0.0.1:8443/api/delegates/count"} ->
json(%{"success" => true, "count" => 42})
%{method: :get, url: "http://127.0.0.1:8443/api/delegates/search", query: [q: "bold", limit: 2]} ->
json(%{"success" => true, "delegates" => [%{"username" => "boldninja"}]})
json(%{"success" => true, "delegates" => [%{username: "boldninja"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/delegates/voters", query: [publicKey: "dummy"]} ->
json(%{"success" => true, "accounts" => [%{"address": "dummy"}]})
json(%{"success" => true, "accounts" => [%{address: "dummy"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/delegates/get", query: [publicKey: "dummy"]} ->
json(%{"success" => true, "delegate" => %{"username" => "dummy"}})
json(%{"success" => true, "delegate" => %{username: "dummy"}})
%{method: :get, url: "http://127.0.0.1:8443/api/delegates"} ->
json(%{"success" => true, "delegates" => [%{"username" => "dummy"}]})
json(%{"success" => true, "delegates" => [%{username: "dummy"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/delegates/fee"} ->
json(%{"success" => true, "fee" => 2500000000})
%{method: :get, url: "http://127.0.0.1:8443/api/delegates/forging/getForgedByAccount", query: [generatorPublicKey: "dummy"]} ->
Expand Down
2 changes: 1 addition & 1 deletion test/arkecosystem/client/one/loader_test.exs
Expand Up @@ -16,7 +16,7 @@ defmodule ArkEcosystem.Client.API.One.LoaderTest do
%{method: :get, url: "http://127.0.0.1:8443/api/loader/status/sync"} ->
json(%{"success" => true, "syncing" => true})
%{method: :get, url: "http://127.0.0.1:8443/api/loader/autoconfigure"} ->
json(%{"success" => true, "network" => %{"token": "dummy"}})
json(%{"success" => true, "network" => %{token: "dummy"}})
end
:ok
end
Expand Down
4 changes: 2 additions & 2 deletions test/arkecosystem/client/one/peers_test.exs
Expand Up @@ -12,9 +12,9 @@ defmodule ArkEcosystem.Client.API.One.PeersTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:8443/api/peers/get", query: [ip: "0.0.0.0", port: 0]} ->
json(%{"success" => true, "peer" => %{"ip" => "0.0.0.0"}})
json(%{"success" => true, "peer" => %{ip: "0.0.0.0"}})
%{method: :get, url: "http://127.0.0.1:8443/api/peers"} ->
json(%{"success" => true, "peers" => [%{"ip" => "0.0.0.0"}]})
json(%{"success" => true, "peers" => [%{ip: "0.0.0.0"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/peers/version"} ->
json(%{"success" => true, "version" => "1"})
end
Expand Down
8 changes: 4 additions & 4 deletions test/arkecosystem/client/one/transactions_test.exs
Expand Up @@ -12,13 +12,13 @@ defmodule ArkEcosystem.Client.API.One.TransactionsTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:8443/api/transactions/get", query: [id: "dummy"]} ->
json(%{"success" => true, "transaction" => %{"id" => "dummy"}})
json(%{"success" => true, "transaction" => %{id: "dummy"}})
%{method: :get, url: "http://127.0.0.1:8443/api/transactions"} ->
json(%{"success" => true, "transactions" => [%{"id" => "dummy"}]})
json(%{"success" => true, "transactions" => [%{id: "dummy"}]})
%{method: :get, url: "http://127.0.0.1:8443/api/transactions/unconfirmed/get", query: [id: "dummy"]} ->
json(%{"success" => true, "transaction" => %{"id" => "dummy"}})
json(%{"success" => true, "transaction" => %{id: "dummy"}})
%{method: :get, url: "http://127.0.0.1:8443/api/transactions/unconfirmed"} ->
json(%{"success" => true, "transactions" => [%{"id" => "dummy"}]})
json(%{"success" => true, "transactions" => [%{id: "dummy"}]})
end
:ok
end
Expand Down
8 changes: 4 additions & 4 deletions test/arkecosystem/client/two/blocks_test.exs
Expand Up @@ -12,13 +12,13 @@ defmodule ArkEcosystem.Client.API.Two.BlocksTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:4003/api/blocks/dummyId"} ->
json(%{"success" => true, "data" => %{ "id": "dummyId" }})
json(%{"success" => true, "data" => %{ id: "dummyId" }})
%{method: :get, url: "http://127.0.0.1:4003/api/blocks"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/blocks/dummyId/transactions"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyTransactionId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyTransactionId" }]})
%{method: :post, url: "http://127.0.0.1:4003/api/blocks/search"} ->
json(%{"success" => true, "data" => [%{ "id": "dummySearch" }]})
json(%{"success" => true, "data" => [%{ id: "dummySearch" }]})
end
:ok
end
Expand Down
8 changes: 4 additions & 4 deletions test/arkecosystem/client/two/delegates_test.exs
Expand Up @@ -12,13 +12,13 @@ defmodule ArkEcosystem.Client.API.Two.DelegatesTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:4003/api/delegates/dummyId"} ->
json(%{"success" => true, "data" => %{ "id": "dummyId" }})
json(%{"success" => true, "data" => %{ id: "dummyId" }})
%{method: :get, url: "http://127.0.0.1:4003/api/delegates"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/delegates/dummyId/blocks"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyBlockId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyBlockId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/delegates/dummyId/voters"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyVoter" }]})
json(%{"success" => true, "data" => [%{ id: "dummyVoter" }]})
end
:ok
end
Expand Down
6 changes: 3 additions & 3 deletions test/arkecosystem/client/two/node_test.exs
Expand Up @@ -12,11 +12,11 @@ defmodule ArkEcosystem.Client.API.Two.NodeTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:4003/api/node/status"} ->
json(%{"success" => true, "data" => %{ "synced": true }})
json(%{"success" => true, "data" => %{ synced: true }})
%{method: :get, url: "http://127.0.0.1:4003/api/node/syncing"} ->
json(%{"success" => true, "data" => %{ "syncing": true }})
json(%{"success" => true, "data" => %{ syncing: true }})
%{method: :get, url: "http://127.0.0.1:4003/api/node/configuration"} ->
json(%{"success" => true, "data" => %{ "nethash": "dummyHash" }})
json(%{"success" => true, "data" => %{ nethash: "dummyHash" }})
end
:ok
end
Expand Down
4 changes: 2 additions & 2 deletions test/arkecosystem/client/two/peers_test.exs
Expand Up @@ -12,9 +12,9 @@ defmodule ArkEcosystem.Client.API.Two.PeersTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:4003/api/peers/0.0.0.0"} ->
json(%{"success" => true, "data" => %{ "ip": "0.0.0.0" }})
json(%{"success" => true, "data" => %{ ip: "0.0.0.0" }})
%{method: :get, url: "http://127.0.0.1:4003/api/peers"} ->
json(%{"success" => true, "data" => [%{ "ip": "0.0.0.0" }]})
json(%{"success" => true, "data" => [%{ ip: "0.0.0.0" }]})
end
:ok
end
Expand Down
16 changes: 8 additions & 8 deletions test/arkecosystem/client/two/transactions_test.exs
Expand Up @@ -12,19 +12,19 @@ defmodule ArkEcosystem.Client.API.Two.TransactionsTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:4003/api/transactions/dummyId"} ->
json(%{"success" => true, "data" => %{ "id": "dummyId" }})
json(%{"success" => true, "data" => %{ id: "dummyId" }})
%{method: :get, url: "http://127.0.0.1:4003/api/transactions"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/transactions/unconfirmed/dummyUnconfirmedId"} ->
json(%{"success" => true, "data" => %{ "id": "dummyUnconfirmedId" }})
json(%{"success" => true, "data" => %{ id: "dummyUnconfirmedId" }})
%{method: :get, url: "http://127.0.0.1:4003/api/transactions/unconfirmed"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyUnconfirmedId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyUnconfirmedId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/transactions/types"} ->
json(%{"success" => true, "data" => %{ "TRANSFER": 0 }})
json(%{"success" => true, "data" => %{ TRANSFER: 0 }})
%{method: :post, url: "http://127.0.0.1:4003/api/transactions"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyCreatedId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyCreatedId" }]})
%{method: :post, url: "http://127.0.0.1:4003/api/transactions/search"} ->
json(%{"success" => true, "data" => [%{ "id": "dummySearch" }]})
json(%{"success" => true, "data" => [%{ id: "dummySearch" }]})
end
:ok
end
Expand Down Expand Up @@ -71,4 +71,4 @@ defmodule ArkEcosystem.Client.API.Two.TransactionsTest do
assert response["success"] == true
end

end
end
4 changes: 2 additions & 2 deletions test/arkecosystem/client/two/votes_test.exs
Expand Up @@ -12,9 +12,9 @@ defmodule ArkEcosystem.Client.API.Two.VotesTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:4003/api/votes/dummyId"} ->
json(%{"success" => true, "data" => %{ "id": "dummyId" }})
json(%{"success" => true, "data" => %{ id: "dummyId" }})
%{method: :get, url: "http://127.0.0.1:4003/api/votes"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyId" }]})
end
:ok
end
Expand Down
18 changes: 9 additions & 9 deletions test/arkecosystem/client/two/wallets_test.exs
Expand Up @@ -12,21 +12,21 @@ defmodule ArkEcosystem.Client.API.Two.WalletsTest do
setup do
mock fn
%{method: :get, url: "http://127.0.0.1:4003/api/wallets/dummyId"} ->
json(%{"success" => true, "data" => %{ "id": "dummyId" }})
json(%{"success" => true, "data" => %{ id: "dummyId" }})
%{method: :get, url: "http://127.0.0.1:4003/api/wallets"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/wallets/top"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyTopId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyTopId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/wallets/dummyId/transactions"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyTransactionId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyTransactionId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/wallets/dummyId/transactions/sent"} ->
json(%{"success" => true, "data" => [%{ "id": "dummySentTransactionId" }]})
json(%{"success" => true, "data" => [%{ id: "dummySentTransactionId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/wallets/dummyId/transactions/received"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyReceivedTransactionId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyReceivedTransactionId" }]})
%{method: :get, url: "http://127.0.0.1:4003/api/wallets/dummyId/votes"} ->
json(%{"success" => true, "data" => [%{ "id": "dummyVoteId" }]})
json(%{"success" => true, "data" => [%{ id: "dummyVoteId" }]})
%{method: :post, url: "http://127.0.0.1:4003/api/wallets/search"} ->
json(%{"success" => true, "data" => [%{ "id": "dummySearch" }]})
json(%{"success" => true, "data" => [%{ id: "dummySearch" }]})
end
:ok
end
Expand Down Expand Up @@ -79,4 +79,4 @@ defmodule ArkEcosystem.Client.API.Two.WalletsTest do
assert response["success"] == true
end

end
end