mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Make Hello flows use the flow "now" time
This cleans up some of the tests, and helps with future injection CLs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=124208164
This commit is contained in:
parent
81dc55ceab
commit
5a2f63cf58
7 changed files with 30 additions and 19 deletions
|
@ -14,10 +14,10 @@
|
|||
|
||||
package google.registry.flows.session;
|
||||
|
||||
import static google.registry.flows.EppXmlTransformer.marshal;
|
||||
import static google.registry.xml.ValidationMode.STRICT;
|
||||
import static google.registry.xml.XmlTestUtils.assertXmlEquals;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static google.registry.testing.TestDataHelper.loadFileWithSubstitutions;
|
||||
import static org.joda.time.format.ISODateTimeFormat.dateTimeNoMillis;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import google.registry.flows.FlowTestCase;
|
||||
|
||||
|
@ -29,8 +29,11 @@ public class HelloFlowTest extends FlowTestCase<HelloFlow> {
|
|||
public void testHello() throws Exception {
|
||||
setEppInput("hello.xml");
|
||||
assertTransactionalFlow(false);
|
||||
assertXmlEquals(readFile("greeting_crr.xml"), new String(marshal(runFlow(), STRICT), UTF_8),
|
||||
"epp.greeting.svDate");
|
||||
runFlowAssertResponse(
|
||||
loadFileWithSubstitutions(
|
||||
getClass(),
|
||||
"greeting_crr.xml",
|
||||
ImmutableMap.of("DATE", clock.nowUtc().toString(dateTimeNoMillis()))));
|
||||
}
|
||||
|
||||
// Extra methods so the test runner doesn't produce empty shards.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue