/**
* This page lets the user edit the options of the Sone plugin.
*/
+@MenuName("Options")
class OptionsPage @Inject constructor(template: Template, webInterface: WebInterface):
SoneTemplatePage("options.html", webInterface, template, "Page.Options.Title") {
import net.pterodactylus.sone.test.getInstance
import net.pterodactylus.sone.test.whenever
import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
import net.pterodactylus.util.web.Method.POST
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
assertThat(baseInjector.getInstance<OptionsPage>(), notNullValue())
}
+ @Test
+ fun `page is annotated with correct menuname`() {
+ assertThat(page.menuName, equalTo("Options"))
+ }
+
}