-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Standard Template and site_name support
* Added site_name support * Standard Template support * More tests
- Loading branch information
Kompanez Andreas, ENT-BIZ-PSR-AUG-AUS
authored and
Kompanez Andreas, ENT-BIZ-PSR-AUG-AUS
committed
Feb 18, 2016
1 parent
0930851
commit 61fd8bf
Showing
13 changed files
with
287 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// LKTemplateLibraryTests.m | ||
// LinkPreviewKit | ||
// | ||
// Created by Andreas Kompanez on 18/02/16. | ||
// Copyright © 2016 Andreas Kompanez. All rights reserved. | ||
// | ||
|
||
#import <XCTest/XCTest.h> | ||
|
||
#import "LKTemplateLibrary.h" | ||
|
||
@interface LKTemplateLibraryTests : XCTestCase | ||
|
||
@property (nonatomic) LKTemplateLibrary *library; | ||
|
||
@end | ||
|
||
@implementation LKTemplateLibraryTests | ||
|
||
- (void)setUp { | ||
[super setUp]; | ||
|
||
self.library = [LKTemplateLibrary new]; | ||
} | ||
|
||
- (void)testThatRegisteredPreviewsAreSame | ||
{ | ||
LKLinkPreview *p0 = [self.library fetchOrRegisterNewLinkPreviewByKind:LKTemplateKindTwitterCard]; | ||
LKLinkPreview *p1 = [self.library fetchOrRegisterNewLinkPreviewByKind:LKTemplateKindTwitterCard]; | ||
XCTAssertEqual(p0, p1); | ||
} | ||
|
||
- (void)testThatResetAndRegisterWorks | ||
{ | ||
XCTAssertTrue(self.library.allPreviews.count == 0); | ||
[self.library fetchOrRegisterNewLinkPreviewByKind:LKTemplateKindStandard]; | ||
[self.library fetchOrRegisterNewLinkPreviewByKind:LKTemplateKindTwitterCard]; | ||
XCTAssertTrue(self.library.allPreviews.count == 2); | ||
[self.library resetRegisteredPreviews]; | ||
XCTAssertTrue(self.library.allPreviews.count == 0); | ||
} | ||
|
||
|
||
@end |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.