Permalink
Browse files

Merge remote branch 'origin/remove-old-api'

Conflicts:
	test/integration/api_test.rb
	test/integration_test_helper.rb

Kept integration_test_helper as it's now needed by other tests.

Removed redundant api_test.
  • Loading branch information...
2 parents c360bcc + acd52a8 commit ad6921e29f35fefdbd4732eddcb44635cce47dee @alext alext committed Aug 2, 2012
Showing with 0 additions and 39 deletions.
  1. +0 −39 test/integration/api_test.rb
@@ -1,39 +0,0 @@
-require_relative '../integration_test_helper'
-require 'capybara/mechanize'
-require 'gds_api/panopticon'
-
-class ApiAcceptanceTest < ActionDispatch::IntegrationTest
- def server
- @server ||= startup_server
- end
-
- def startup_server
- server = Capybara::Server.new(Capybara.app)
- server.boot
- server
- end
-
- setup do
- WebMock.allow_net_connect!
- Capybara.current_driver = :mechanize
- end
-
- #pending "this is testing deprecated functionality"
- #should "Can create an artefact via the api" do
- #create_test_user
- #api_client = GdsApi::Panopticon.new(nil, endpoint_url: server.url(""), timeout: 5)
- #artefact_fixture = {slug: "foo", name: "Foo", owning_app: "Test", kind: "custom-application", need_id: 1}
- #
- #created = nil
- #assert_difference "Artefact.count" do
- #created = api_client.create_artefact(artefact_fixture)
- #end
- #
- #assert ! created['id'].nil?
- #found_artefact = Artefact.find(created['id'])
- #assert artefact_fixture[:slug], found_artefact.slug
- #assert artefact_fixture[:name], found_artefact.name
- #assert artefact_fixture[:owning_app], found_artefact.owning_app
- #assert artefact_fixture[:kind], found_artefact.kind
- #end
-end

0 comments on commit ad6921e

Please sign in to comment.