Skip to content

Commit

Permalink
fix warnings in test files
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorv-2204 authored and Neylix committed Feb 1, 2023
1 parent 6fc5b44 commit 8563823
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/archethic/oracle_chain/services/uco_price_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ defmodule Archethic.OracleChain.Services.UCOPriceTest do

test "fetch/0 should retrieve some data and build a map with the oracle name in it and keep the precision to 5" do
MockUCOPriceProvider1
|> expect(:fetch, fn pairs ->
|> expect(:fetch, fn _pairs ->
{:ok, %{"eur" => [0.123456789], "usd" => [0.123454789]}}
end)

MockUCOPriceProvider2
|> expect(:fetch, fn pairs ->
|> expect(:fetch, fn _pairs ->
{:ok, %{"eur" => [0.123456789], "usd" => [0.123454789]}}
end)

MockUCOPriceProvider3
|> expect(:fetch, fn pairs ->
|> expect(:fetch, fn _pairs ->
{:ok, %{"eur" => [0.123456789], "usd" => [0.123454789]}}
end)

Expand Down
8 changes: 8 additions & 0 deletions test/archethic_web/graphql_schema_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ defmodule ArchethicWeb.GraphQLSchemaTest do

_, %GetGenesisAddress{}, _ ->
{:ok, %NotFound{}}

_, %GetLastTransactionAddress{}, _ ->
{:ok, %LastTransactionAddress{address: last}}
end)

conn =
Expand Down Expand Up @@ -549,6 +552,11 @@ defmodule ArchethicWeb.GraphQLSchemaTest do
test "should return same address", %{conn: conn} do
addr = <<0::8, 0::8, :crypto.strong_rand_bytes(32)::binary>>

MockClient
|> stub(:send_message, fn _, %GetGenesisAddress{}, _ ->
{:ok, %GenesisAddress{address: addr}}
end)

conn =
post(conn, "/api", %{
"query" => "query {
Expand Down

0 comments on commit 8563823

Please sign in to comment.