Skip to content

Commit fcb3543

Browse files
authored
Remove 'Z' prefix from a couple test case classes (#18660)
2 parents 47fef86 + 89850a3 commit fcb3543

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

WordPress/WordPressTest/Dashboard/BlogDashboardServiceTests.swift

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ import Nimble
33

44
@testable import WordPress
55

6-
/// This test stuite is clashing with other tests
7-
/// Specifically:
8-
/// - [BlogJetpackTest testJetpackSetupDoesntReplaceDotcomAccount]
9-
/// - CommentServiceTests.testFailingFetchCommentLikesShouldCallFailureBlock()
10-
///
11-
/// We weren't able to figure out why but it seems a race condition + Core data
12-
/// For now, renaming the suite to change the execution order solves the issue.
13-
class ZBlogDashboardServiceTests: XCTestCase {
14-
private var contextManager: ContextManagerMock!
6+
class BlogDashboardServiceTests: CoreDataTestCase {
157
private var context: NSManagedObjectContext!
168

179
private var service: BlogDashboardService!
@@ -26,7 +18,6 @@ class ZBlogDashboardServiceTests: XCTestCase {
2618

2719
remoteServiceMock = DashboardServiceRemoteMock()
2820
persistenceMock = BlogDashboardPersistenceMock()
29-
contextManager = ContextManagerMock()
3021
context = contextManager.newDerivedContext()
3122
postsParserMock = BlogDashboardPostsParserMock(managedObjectContext: context)
3223
service = BlogDashboardService(managedObjectContext: context, remoteService: remoteServiceMock, persistence: persistenceMock, postsParser: postsParserMock)
@@ -35,7 +26,6 @@ class ZBlogDashboardServiceTests: XCTestCase {
3526
override func tearDown() {
3627
super.tearDown()
3728
context = nil
38-
contextManager = nil
3929
}
4030

4131
func testCallServiceWithCorrectIDAndCards() {
@@ -260,7 +250,7 @@ class ZBlogDashboardServiceTests: XCTestCase {
260250
}
261251

262252
func dictionary(from file: String) -> NSDictionary? {
263-
let fileURL: URL = Bundle(for: ZBlogDashboardServiceTests.self).url(forResource: file, withExtension: nil)!
253+
let fileURL: URL = Bundle(for: BlogDashboardServiceTests.self).url(forResource: file, withExtension: nil)!
264254
let data: Data = try! Data(contentsOf: fileURL)
265255
return try? JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary
266256
}
@@ -295,7 +285,7 @@ class DashboardServiceRemoteMock: DashboardServiceRemote {
295285
didCallWithBlogID = blogID
296286
didRequestCards = cards
297287

298-
if let fileURL: URL = Bundle(for: ZBlogDashboardServiceTests.self).url(forResource: respondWith.rawValue, withExtension: nil),
288+
if let fileURL: URL = Bundle(for: BlogDashboardServiceTests.self).url(forResource: respondWith.rawValue, withExtension: nil),
299289
let data: Data = try? Data(contentsOf: fileURL),
300290
let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []) as AnyObject {
301291
success(jsonObject as! NSDictionary)

WordPress/WordPressTest/Dashboard/DashboardCardTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class MockDefaultSectionProvider: DefaultSectionProvider {
99
}
1010
}
1111

12-
class ZDashboardCardTests: CoreDataTestCase {
12+
class DashboardCardTests: CoreDataTestCase {
1313

1414
private var context: NSManagedObjectContext!
1515
private var blog: Blog!

0 commit comments

Comments
 (0)