Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify JVM and JS tests #115

Merged
merged 5 commits into from May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,46 @@
/*
* Copyright 2016-2017 47 Degrees, LLC. <http://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package github4s.integration

import fr.hmil.roshttp.response.SimpleHttpResponse
import github4s.HttpRequestBuilderExtension
import github4s.free.interpreters.{Capture, Interpreters}
import github4s.js.ImplicitsJS
import github4s.utils.{BaseIntegrationSpec, TestUtilsJS}

import scala.concurrent.Future

class IntegrationSpec
extends BaseIntegrationSpec[SimpleHttpResponse]
with GHAuthSpec[SimpleHttpResponse]
with GHGistsSpec[SimpleHttpResponse]
with GHGitDataSpec[SimpleHttpResponse]
with GHIssuesSpec[SimpleHttpResponse]
with GHPullRequestsSpec[SimpleHttpResponse]
with GHReposSpec[SimpleHttpResponse]
with GHStatusesSpec[SimpleHttpResponse]
with GHUsersSpec[SimpleHttpResponse]
with ImplicitsJS
with TestUtilsJS {

override implicit def extension(
implicit capture: Capture[Future]): HttpRequestBuilderExtension[SimpleHttpResponse, Future] =
extensionJS

override implicit def futureInterpreters: Interpreters[Future, SimpleHttpResponse] =
intInstanceFutureRosHttp
}
375 changes: 0 additions & 375 deletions github4s/js/src/test/scala/github4s/utils/FakeResponses.scala

This file was deleted.

126 changes: 0 additions & 126 deletions github4s/js/src/test/scala/github4s/utils/TestUtils.scala

This file was deleted.

26 changes: 26 additions & 0 deletions github4s/js/src/test/scala/github4s/utils/TestUtilsJS.scala
@@ -0,0 +1,26 @@
/*
* Copyright 2016-2017 47 Degrees, LLC. <http://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package github4s.utils

import org.scalatest.Matchers

trait TestUtilsJS extends Matchers with TestData {

val accessToken: Option[String] = Option(github4s.BuildInfo.token)
def tokenHeader: String = "token " + accessToken.getOrElse("")

}
66 changes: 0 additions & 66 deletions github4s/jvm/src/test/scala/github4s/integration/GHAuthSpec.scala

This file was deleted.

45 changes: 0 additions & 45 deletions github4s/jvm/src/test/scala/github4s/integration/GHGistsSpec.scala

This file was deleted.

This file was deleted.