Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Implement #693, fixed some suggestions from #883. #1443

Closed
wants to merge 8 commits into from
Prev Previous commit
Next Next commit
Fixed JSQLcoationMediaItemTests
  • Loading branch information
pstasiak committed Feb 13, 2016
commit 7a374f4d297629956a7a746d98dab56d5350bf77
18 changes: 7 additions & 11 deletions JSQMessagesTests/ModelTests/JSQLocationMediaItemTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ - (void)testMediaDataProtocol
}

- (void)testCopyableItemInMediaProtocol {
// JSQLocationMediaItem *item = [[JSQLocationMediaItem alloc] initWithLocation:self.location];
// XCTAssertNotNil(item);
// XCTAssertNotNil([item copyableMediaItem]);
//
// NSDictionary *copyableMediaItem = [item copyableMediaItem];
// XCTAssertNotNil(copyableMediaItem[JSQPasteboardUTTypeKey]);
// XCTAssertEqualObjects((NSString *)kUTTypeURL, copyableMediaItem[JSQPasteboardUTTypeKey]);
//
// XCTAssertNotNil(copyableMediaItem[JSQPasteboardDataKey]);
// NSURL *locationURL = [[NSURL alloc] initWithString:@"http://maps.google.com/maps?z=12&t=m&q=loc:37.795313+-122.393757"];
// XCTAssertEqualObjects(locationURL, copyableMediaItem[JSQPasteboardDataKey]);
JSQLocationMediaItem *item = [[JSQLocationMediaItem alloc] initWithLocation:self.location];
XCTAssertNotNil(item);

XCTAssertEqualObjects((NSString *)kUTTypeURL, [item copyableDataType]);

NSURL *locationURL = [[NSURL alloc] initWithString:@"http://maps.google.com/maps?z=12&t=m&q=loc:37.795313+-122.393757"];
XCTAssertEqualObjects(locationURL, [item copyableData]);
}

@end