Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
koppen committed Jul 22, 2014
1 parent aaf55b9 commit 86944be
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions test/functional/github_hook_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,8 @@ def setup
Repository.expects(:fetch_changesets).never
end

def mock_descriptor(kind, contents = [])
descriptor = mock(kind)
descriptor.expects(:readlines).returns(contents)
descriptor
end

def do_post(payload = nil)
payload = json if payload.nil?
payload = payload.to_json if payload.is_a?(Hash)
post :index, :payload => payload
end

def test_should_use_the_repository_name_as_project_identifier
Project.expects(:find_by_identifier).with('github').returns(project)
GithubHook::Updater.any_instance.stubs(:exec).returns(true)
do_post
def do_post
post :index, :payload => json
end

def test_should_render_ok_when_done
Expand Down

0 comments on commit 86944be

Please sign in to comment.