Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
7356f9f6
Unverified
Commit
7356f9f6
authored
Dec 02, 2017
by
Felix Krause
Committed by
GitHub
Dec 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for validate_source_url
parent
bb7f98b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
validator_spec.rb
spec/unit/validator_spec.rb
+19
-0
No files found.
spec/unit/validator_spec.rb
View file @
7356f9f6
...
@@ -139,6 +139,7 @@ module Pod
...
@@ -139,6 +139,7 @@ module Pod
@validator
.
stubs
(
:validate_screenshots
)
@validator
.
stubs
(
:validate_screenshots
)
@validator
.
stubs
(
:validate_social_media_url
)
@validator
.
stubs
(
:validate_social_media_url
)
@validator
.
stubs
(
:validate_documentation_url
)
@validator
.
stubs
(
:validate_documentation_url
)
@validator
.
stubs
(
:validate_source_url
)
@validator
.
stubs
(
:perform_extensive_subspec_analysis
)
@validator
.
stubs
(
:perform_extensive_subspec_analysis
)
Specification
.
any_instance
.
stubs
(
:available_platforms
).
returns
([])
Specification
.
any_instance
.
stubs
(
:available_platforms
).
returns
([])
...
@@ -259,6 +260,24 @@ module Pod
...
@@ -259,6 +260,24 @@ module Pod
end
end
describe
'documentation URL validation'
do
describe
'documentation URL validation'
do
before
do
@validator
.
unstub
(
:validate_source_url
)
end
it
'checks if the source URL is valid'
do
Specification
.
any_instance
.
stubs
(
:source
).
returns
({
:http
=>
'https://orta.io/package.zip'
})
@validator
.
validate
@validator
.
results
.
should
.
be
.
empty?
end
it
"should fail validation if the source URL is not HTTPs encrypted"
do
Specification
.
any_instance
.
stubs
(
:source
).
returns
({
:http
=>
'http://orta.io/package.zip'
})
@validator
.
validate
@validator
.
results
.
map
(
&
:to_s
).
first
.
should
.
match
/use the encrypted HTTPs protocol./
end
end
describe
'source URL validation'
do
before
do
before
do
@validator
.
unstub
(
:validate_documentation_url
)
@validator
.
unstub
(
:validate_documentation_url
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment