Remove the span added to the feedback
This commit is contained in:
parent
798afc756b
commit
f7d3fd586e
@ -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"))));
|
||||
}
|
||||
}
|
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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("<table><tr><th>")));
|
||||
}
|
||||
|
||||
@ -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("<tr><td>96134<\\/td><td>Bob<\\/td><td>Franco<\\/td><td>Marketing<\\/td><td>83700<\\/td><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());
|
||||
}
|
||||
|
||||
|
@ -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("<table><tr><th>")));
|
||||
} 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("<table><tr><th>")));
|
||||
}
|
||||
}
|
||||
@ -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("<tr><td>96134<\\/td><td>Bob<\\/td><td>Franco<\\/td><td>Marketing<\\/td><td>83700<\\/td><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("<tr><td>96134<\\/td><td>Bob<\\/td><td>Franco<\\/td><td>Marketing<\\/td><td>83700<\\/td><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")));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user