-
-
Notifications
You must be signed in to change notification settings - Fork 366
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 #1521 from OWASP/updatechallenge48
Update challenge48 to have both solutions in 1
- Loading branch information
Showing
5 changed files
with
44 additions
and
8 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
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
21 changes: 21 additions & 0 deletions
21
src/test/java/org/owasp/wrongsecrets/challenges/kubernetes/Challenge48Test.java
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,21 @@ | ||
package org.owasp.wrongsecrets.challenges.kubernetes; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class Challenge48Test { | ||
|
||
@Test | ||
void spoilerShouldGiveAnswer() { | ||
var challenge = new Challenge48("answer"); | ||
assertThat(challenge.spoiler().solution()).isEqualTo("answer"); | ||
assertThat(challenge.answerCorrect(challenge.spoiler().solution())).isTrue(); | ||
} | ||
|
||
@Test | ||
void incorrectAnswerShouldNotSolveChallenge() { | ||
var challenge = new Challenge48("answer"); | ||
assertThat(challenge.answerCorrect("wrong answer")).isFalse(); | ||
} | ||
} |