Skip to content

Commit

Permalink
fix: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hieu.ha committed Jan 21, 2025
1 parent ae600c9 commit 943628e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/gno.land/r/ursulovic/home/home_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestUpdateGithubUrl(t *testing.T) {
caller := std.Address("g1d24j8fwnc0w5q427fauyey4gdd30qgu69k6n0x")
std.TestSetOrigCaller(caller)
std.TestSetOriginCaller(caller)

newUrl := "https://github.com/example"

Expand All @@ -22,7 +22,7 @@ func TestUpdateGithubUrl(t *testing.T) {

func TestUpdateLinkedinUrl(t *testing.T) {
caller := std.Address("g1d24j8fwnc0w5q427fauyey4gdd30qgu69k6n0x")
std.TestSetOrigCaller(caller)
std.TestSetOriginCaller(caller)

newUrl := "https://www.linkedin.com/in/example"

Expand All @@ -35,7 +35,7 @@ func TestUpdateLinkedinUrl(t *testing.T) {

func TestUpdateAboutMe(t *testing.T) {
caller := std.Address("g1d24j8fwnc0w5q427fauyey4gdd30qgu69k6n0x")
std.TestSetOrigCaller(caller)
std.TestSetOriginCaller(caller)

newAboutMe := "This is new description!"

Expand All @@ -48,12 +48,12 @@ func TestUpdateAboutMe(t *testing.T) {

func TestUpdateSelectedImage(t *testing.T) {
var user = testutils.TestAddress("user")
std.TestSetOrigCaller(user)
std.TestSetOriginCaller(user)

validImageUrl := "https://i.ibb.co/hLtmnX0/beautiful-rain-forest-ang-ka-nature-trail-doi-inthanon-national-park-thailand-36703721.webp"

coinsSent := std.NewCoins(std.NewCoin("ugnot", 5000000)) // Update to match the price expected by your function
std.TestSetOrigSend(coinsSent, std.NewCoins())
std.TestSetOriginSend(coinsSent, std.NewCoins())

UpdateSelectedImage(validImageUrl)

Expand All @@ -72,7 +72,7 @@ func TestUpdateSelectedImage(t *testing.T) {
UpdateSelectedImage(invalidImageUrl)

invalidCoins := std.NewCoins(std.NewCoin("ugnot", 1000000))
std.TestSetOrigSend(invalidCoins, std.NewCoins())
std.TestSetOriginSend(invalidCoins, std.NewCoins())

defer func() {
if r := recover(); r == nil {
Expand All @@ -85,7 +85,7 @@ func TestUpdateSelectedImage(t *testing.T) {

func TestUpdateImagePrice(t *testing.T) {
caller := std.Address("g1d24j8fwnc0w5q427fauyey4gdd30qgu69k6n0x")
std.TestSetOrigCaller(caller)
std.TestSetOriginCaller(caller)

var newImageUpdatePrice int64 = 3000000

Expand Down

0 comments on commit 943628e

Please sign in to comment.