-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from bustoutsolutions/fix-imageresource-nil-u…
…rl-handling Return a nil imageResource for a nil imageURL
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
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,38 @@ | ||
// | ||
// RemoteImageViewSpec.swift | ||
// Siesta | ||
// | ||
// Created by Paul on 2018/6/22. | ||
// Copyright © 2018 Bust Out Solutions. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import SiestaUI | ||
import Quick | ||
import Nimble | ||
import Nocilla | ||
|
||
class RemoteImageViewSpec: SiestaSpec | ||
{ | ||
override func spec() | ||
{ | ||
let remoteImageView = specVar { RemoteImageView() } | ||
|
||
it("handles a nil imageResource") | ||
{ | ||
remoteImageView().imageResource = nil | ||
expect(remoteImageView().imageURL).to(beNil()) | ||
expect(remoteImageView().imageResource).to(beNil()) | ||
} | ||
|
||
it("handles a nil imageURL") | ||
{ | ||
remoteImageView().imageURL = nil | ||
expect(remoteImageView().imageURL).to(beNil()) | ||
expect(remoteImageView().imageResource).to(beNil()) | ||
} | ||
|
||
// TODO: build out SiestaUI tests | ||
} | ||
} |