From f7d3fd586e5f5a70f43c693807835bc342db40fe Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Mon, 29 Mar 2021 11:01:16 +0200 Subject: [PATCH] Remove the span added to the feedback --- .../SqlInjectionLesson10Test.java | 6 +++--- .../SqlInjectionLesson5aTest.java | 2 +- .../SqlInjectionLesson6aTest.java | 2 +- .../introduction/SqlInjectionLesson8Test.java | 8 ++++---- .../introduction/SqlInjectionLesson9Test.java | 20 +++++++++---------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10Test.java b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10Test.java index f653b4107..9d85993df 100644 --- a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10Test.java +++ b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson10Test.java @@ -49,7 +49,7 @@ public class SqlInjectionLesson10Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.10.entries"))))); + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.10.entries")))); } catch (AssertionError e) { if (!e.getMessage().contains(completedError)) throw e; @@ -58,7 +58,7 @@ public class SqlInjectionLesson10Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.10.success"))))); + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.10.success")))); } } @@ -69,6 +69,6 @@ public class SqlInjectionLesson10Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.10.success"))))); + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.10.success")))); } } \ No newline at end of file diff --git a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java index 723e6e855..d3c482ac0 100644 --- a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java +++ b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5aTest.java @@ -57,7 +57,7 @@ public class SqlInjectionLesson5aTest extends SqlLessonTest { .param("operator", "").param("injection", "")) .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("NoResultsMatched"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("NoResultsMatched")))) .andExpect(jsonPath("$.output").doesNotExist()); } diff --git a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java index d21e5d1f6..dec4295ed 100644 --- a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java +++ b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson6aTest.java @@ -85,7 +85,7 @@ public class SqlInjectionLesson6aTest extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("$.lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.6a.no.results"))))); + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.6a.no.results")))); } @Test diff --git a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java index 395f14700..66f89c26f 100644 --- a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java +++ b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson8Test.java @@ -48,7 +48,7 @@ public class SqlInjectionLesson8Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(modifySpan(messages.getMessage("sql-injection.8.one"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.8.one")))) .andExpect(jsonPath("$.output", containsString("
"))); } @@ -60,7 +60,7 @@ public class SqlInjectionLesson8Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(modifySpan(messages.getMessage("sql-injection.8.success"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.8.success")))) .andExpect(jsonPath("$.output", containsString("
96134<\\/td>Bob<\\/td>Franco<\\/td>Marketing<\\/td>83700<\\/td>LO9S2V<\\/td><\\/tr>"))); } @@ -72,7 +72,7 @@ public class SqlInjectionLesson8Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(modifySpan(messages.getMessage("sql-injection.8.no.results"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.8.no.results")))) .andExpect(jsonPath("$.output").doesNotExist()); } @@ -84,7 +84,7 @@ public class SqlInjectionLesson8Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(modifySpan(messages.getMessage("sql-injection.8.no.results"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.8.no.results")))) .andExpect(jsonPath("$.output").doesNotExist()); } diff --git a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java index b513088f8..b495e7aa2 100644 --- a/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java +++ b/webgoat-lessons/sql-injection/src/test/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson9Test.java @@ -51,7 +51,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.9.one"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.9.one")))) .andExpect(jsonPath("$.output", containsString("
"))); } catch (AssertionError e) { if (!e.getMessage().contains(completedError)) throw e; @@ -62,7 +62,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.9.success"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.9.success")))) .andExpect(jsonPath("$.output", containsString("
"))); } } @@ -76,7 +76,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.9.one"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.9.one")))) .andExpect(jsonPath("$.output", containsString("
96134<\\/td>Bob<\\/td>Franco<\\/td>Marketing<\\/td>83700<\\/td>LO9S2V<\\/td><\\/tr>"))); } catch (AssertionError e) { if (!e.getMessage().contains(completedError)) throw e; @@ -87,7 +87,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.9.success"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.9.success")))) .andExpect(jsonPath("$.output", containsString("
96134<\\/td>Bob<\\/td>Franco<\\/td>Marketing<\\/td>83700<\\/td>LO9S2V<\\/td><\\/tr>"))); } } @@ -101,7 +101,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.8.no.results"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.8.no.results")))) .andExpect(jsonPath("$.output").doesNotExist()); } catch (AssertionError e) { if (!e.getMessage().contains(completedError)) throw e; @@ -112,7 +112,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.8.no.success"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.8.no.success")))) .andExpect(jsonPath("$.output").doesNotExist()); } } @@ -126,7 +126,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(false))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.8.no.results"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.8.no.results")))) .andExpect(jsonPath("$.output").doesNotExist()); } catch (AssertionError e) { if (!e.getMessage().contains(completedError)) throw e; @@ -137,7 +137,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.9.success"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.9.success")))) .andExpect(jsonPath("$.output").doesNotExist()); } } @@ -162,7 +162,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.9.success"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.9.success")))) .andExpect(jsonPath("$.output", containsString("feedback-negative"))); } } @@ -175,7 +175,7 @@ public class SqlInjectionLesson9Test extends SqlLessonTest { .andExpect(status().isOk()) .andExpect(jsonPath("lessonCompleted", is(true))) - .andExpect(jsonPath("$.feedback", is(SqlInjectionLesson8Test.modifySpan(messages.getMessage("sql-injection.9.success"))))) + .andExpect(jsonPath("$.feedback", is(messages.getMessage("sql-injection.9.success")))) .andExpect(jsonPath("$.output", containsString("300000"))); } } \ No newline at end of file