Skip to content

Commit

Permalink
fix(tests): assure tests actually work
Browse files Browse the repository at this point in the history
Previously we simply forgot to run the tests, and published test-code
that didn't really work.
  • Loading branch information
Byron committed Aug 8, 2015
1 parent a169d96 commit ad0bde3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn main() {
}

let client = hyper::Client::with_connector(mock::TeeConnector {
connector: hyper::net::HttpConnector(None)
connector: hyper::net::HttpConnector
});

match oauth2::Authenticator::new(&secret, StdoutHandler, client,
Expand Down
2 changes: 0 additions & 2 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,6 @@ pub mod tests {
fn connect(&self, host: &str, port: u16, scheme: &str) -> ::hyper::Result<MockStream> {
self.0.connect(host, port, scheme)
}

fn set_ssl_verifier(&mut self, _: hyper::net::ContextVerifier) {}
}

#[test]
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//! extern crate hyper;
//! extern crate yup_oauth2 as oauth2;
//! extern crate serde;
//! extern crate serde_json;
//!
//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, PollInformation, ConsoleApplicationSecret, MemoryStorage, GetToken};
//! use serde_json as json;
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ extern crate serde_json;
extern crate chrono;

extern crate hyper;
#[macro_use] #[cfg(test)]
#[cfg(test)]
extern crate log;
#[macro_use] #[cfg(test)]
#[cfg(test)]
extern crate yup_hyper_mock;
extern crate mime;
extern crate url;
Expand Down
2 changes: 0 additions & 2 deletions src/refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ mod tests {
fn connect(&self, host: &str, port: u16, scheme: &str) -> ::hyper::Result<MockStream> {
self.0.connect(host, port, scheme)
}

fn set_ssl_verifier(&mut self, _: hyper::net::ContextVerifier) {}
}

#[test]
Expand Down

0 comments on commit ad0bde3

Please sign in to comment.