Skip to content

Commit

Permalink
Add tests for default asset types
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Jul 29, 2015
1 parent ad02621 commit b1a827b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions MacDownTests/MPAssetTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
#import <XCTest/XCTest.h>
#import "MPAsset.h"


@interface MPAsset ()
@property (readonly, nonatomic) NSString *typeName;
@end


@interface MPAssetTests : XCTestCase
@property (strong) NSBundle *bundle;
@end
Expand All @@ -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],
Expand Down

0 comments on commit b1a827b

Please sign in to comment.