]> WPIA git - gigi.git/blobdiff - tests/club/wpia/gigi/testUtils/SEClientTest.java
chg: create superclass for SE tests
[gigi.git] / tests / club / wpia / gigi / testUtils / SEClientTest.java
diff --git a/tests/club/wpia/gigi/testUtils/SEClientTest.java b/tests/club/wpia/gigi/testUtils/SEClientTest.java
new file mode 100644 (file)
index 0000000..004f34f
--- /dev/null
@@ -0,0 +1,23 @@
+package club.wpia.gigi.testUtils;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+
+import club.wpia.gigi.GigiApiException;
+import club.wpia.gigi.dbObjects.Group;
+import club.wpia.gigi.pages.admin.support.SupportEnterTicketPage;
+
+/**
+ * Superclass for testsuites in a scenario where there is a supporter, who is
+ * already logged on.
+ */
+public abstract class SEClientTest extends ClientTest {
+
+    public SEClientTest() throws IOException, GigiApiException {
+        grant(u, Group.SUPPORTER);
+        cookie = login(email, TEST_PASSWORD);
+        assertEquals(302, post(cookie, SupportEnterTicketPage.PATH, "ticketno=a20140808.8&setTicket=action", 0).getResponseCode());
+    }
+
+}