Search in sources :

Example 1 with Urls

use of com.kickstarter.models.Urls in project android-oss by kickstarter.

the class RefTagUtilsTest method testBuildCookieForRefTagAndProject_WithMalformedUrl.

@Test
public void testBuildCookieForRefTagAndProject_WithMalformedUrl() {
    final Web webUrls = ProjectFactory.project().urls().web().toBuilder().project("such:\\bad^<data").build();
    final Urls urls = ProjectFactory.project().urls().toBuilder().web(webUrls).build();
    final Project project = ProjectFactory.project().toBuilder().urls(urls).build();
    final RefTag refTag = RefTag.category();
    final HttpCookie cookie = RefTagUtils.buildCookieWithRefTagAndProject(refTag, project);
    assertNull(cookie);
}
Also used : Project(com.kickstarter.models.Project) Web(com.kickstarter.models.Web) RefTag(com.kickstarter.libs.RefTag) Urls(com.kickstarter.models.Urls) HttpCookie(java.net.HttpCookie) Test(org.junit.Test)

Aggregations

RefTag (com.kickstarter.libs.RefTag)1 Project (com.kickstarter.models.Project)1 Urls (com.kickstarter.models.Urls)1 Web (com.kickstarter.models.Web)1 HttpCookie (java.net.HttpCookie)1 Test (org.junit.Test)1