Skip to content

Commit

Permalink
#255 tested and fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 28, 2018
1 parent 1b4ac2f commit b917d53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 0pdd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@

def repo_name(name)
error 404 if name.nil?
error 404 unless name =~ %r{^[a-zA-Z0-9_]+/[a-zA-Z0-9_]+$}
error 404 unless name =~ %r{^[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+$}
name
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_0pdd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_renders_page_not_found
def test_it_understands_push_from_github
post(
'/hook/github',
'{"repository":{"full_name":"yegor256/pdd"}, "ref":"refs/heads/master"}',
'{"repository":{"full_name":"yegor256-one/0pdd-test"}, "ref":"refs/heads/master"}',
'CONTENT_TYPE' => 'application/json'
)
assert(last_response.ok?)
Expand Down

0 comments on commit b917d53

Please sign in to comment.