import static com.google.common.collect.ImmutableSortedSet.of;
import static java.util.Arrays.asList;
+import static java.util.Collections.emptyList;
+import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
import static org.mockito.Mockito.mock;
assertThatSearchReturnsEmpty(IssueQuery.builder().viewUuids(asList("unknown")));
}
+ @Test
+ public void filter_by_views_not_having_projects() {
+ OrganizationDto organizationDto = newOrganizationDto();
+ ComponentDto project1 = ComponentTesting.newPrivateProjectDto(organizationDto);
+ ComponentDto file1 = newFileDto(project1, null);
+ indexIssues(newDoc("I2", file1));
+ String view1 = "ABCD";
+ indexView(view1, emptyList());
+
+ assertThatSearchReturnsOnly(IssueQuery.builder().viewUuids(singletonList(view1)));
+ }
+
@Test
public void filter_by_created_after_by_projects() {
Date now = new Date();