diff --git a/MacDownTests/MPAssetTests.m b/MacDownTests/MPAssetTests.m index 35536ed2..4782541b 100644 --- a/MacDownTests/MPAssetTests.m +++ b/MacDownTests/MPAssetTests.m @@ -9,6 +9,12 @@ #import #import "MPAsset.h" + +@interface MPAsset () +@property (readonly, nonatomic) NSString *typeName; +@end + + @interface MPAssetTests : XCTestCase @property (strong) NSBundle *bundle; @end @@ -22,6 +28,18 @@ - (void)setUp self.bundle = [NSBundle bundleForClass:[self class]]; } +- (void)testDefaultAssetType +{ + MPAsset *asset = [[MPAsset alloc] init]; + XCTAssertEqualObjects(asset.typeName, @"text/plain"); + + MPStyleSheet *css = [[MPStyleSheet alloc] init]; + XCTAssertEqualObjects(css.typeName, @"text/css"); + + MPScript *script = [[MPScript alloc] init]; + XCTAssertEqualObjects(script.typeName, @"text/javascript"); +} + - (void)testAssetNone { XCTAssertNil([[[MPScript alloc] init] htmlForOption:MPAssetNone],