-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from fieu/feature/modify-webhook
- Loading branch information
Showing
3 changed files
with
144 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env bats | ||
|
||
load pre | ||
|
||
# Modify without username or avatar | ||
@test "modify: --modify (should fail)" { | ||
run bash discord.sh --modify | ||
[ "${lines[0]}" = "fatal: must pass --username or --avatar with --modify" ] | ||
[ "$status" -eq 1 ] | ||
} | ||
# Modify with username | ||
@test "modify: --modify --username --gnu-style <>" { | ||
run bash discord.sh --modify --username "Modify with username" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: verify --modify ---username --gnu-style <>" { | ||
run bash discord.sh --text "verify" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: --modify --username --gnu-style=<>" { | ||
run bash discord.sh --modify --username="Modify with username" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: verify --modify ---username --gnu-style=<>" { | ||
run bash discord.sh --text "verify" | ||
[ "$status" -eq 0 ] | ||
} | ||
# Modify with avatar | ||
@test "modify: --modify --avatar --gnu-style <>" { | ||
run bash discord.sh --modify --avatar "https://i.imgur.com/12jyR5Q.png" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: verify --modify ---avatar --gnu-style <>" { | ||
run bash discord.sh --text "verify" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: --modify --avatar --gnu-style=<>" { | ||
run bash discord.sh --modify --avatar="https://i.imgur.com/12jyR5Q.png" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: verify --modify ---avatar --gnu-style=<>" { | ||
run bash discord.sh --text "verify" | ||
[ "$status" -eq 0 ] | ||
} | ||
# Modify with username and avatar | ||
@test "modify: --modify --username --avatar --gnu-style <>" { | ||
run bash discord.sh --modify --username "Modify with username and avatar" --avatar "https://i.imgur.com/12jyR5Q.png" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: verify --modify --username --avatar --gnu-style <>" { | ||
run bash discord.sh --text "verify" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: --modify --username --avatar --gnu-style=<>" { | ||
run bash discord.sh --modify --username "Modify with username and avatar" --avatar "https://i.imgur.com/12jyR5Q.png" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: verify --modify --username --avatar --gnu-style=<>" { | ||
run bash discord.sh --text "verify" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: --modify --username --avatar --gnu-style varied" { | ||
run bash discord.sh --modify --username "Modify with username and avatar" --avatar="https://i.imgur.com/12jyR5Q.png" | ||
[ "$status" -eq 0 ] | ||
} | ||
@test "modify: verify --modify --username --avatar --gnu-style varied" { | ||
run bash discord.sh --text "verify" | ||
[ "$status" -eq 0 ] | ||
} |