         XCTAssertEqual(viewRenderer.capturedContext?["users"]?.array?.count, 2)
         XCTAssertEqual(viewRenderer.capturedContext?["users"]?.array?.first?["name"]?.string, users.first?.name)
         XCTAssertEqual(viewRenderer.capturedContext?["published_posts"]?.array?.count, 2)
-        XCTAssertEqual(viewRenderer.capturedContext?["published_posts"]?.array?.first?["title"]?.string, posts[1].title)
+        XCTAssertEqual(viewRenderer.capturedContext?["published_posts"]?.array?.first?["title"]?.string, posts.data[1].title)
         XCTAssertEqual(viewRenderer.capturedContext?["draft_posts"]?.array?.count, 1)
         XCTAssertEqual(viewRenderer.capturedContext?["draft_posts"]?.array?.first?["title"]?.string, draftPost.title)
         XCTAssertEqual(viewRenderer.leafPath, "blog/admin/index")

    
    // MARK: - Helpers
    
    private func setupBlogIndex() throws -> ([BlogPost], [BlogTag], [BlogUser]) {
        let user1 = TestDataBuilder.anyUser()
        try user1.save()
        let user2 = TestDataBuilder.anyUser(name: "Han", username: "han")

    }
    
    func testAuthorViewHasNoPostsSetIfNoneCreated() throws {
        let (author, _) = try setupAuthorPage()
        let emptyPosts = try BlogPost.makeQuery().filter("title", "Some non-existing query").paginate(for: authorRequest)
        let _ = try viewFactory.createProfileView(uri: authorURI, author: author, isMyProfile: true, paginatedPosts: emptyPosts, loggedInUser: nil, disqusName: nil, siteTwitterHandle: nil)
        XCTAssertNil(viewRenderer.capturedContext?["posts"])
    }
    
    func testAuthorViewGetsLoggedInUserIfProvider() throws {
