Skip to content

Commit

Permalink
Stubbed remaining tests.
Browse files Browse the repository at this point in the history
ray-kast committed Aug 17, 2022
1 parent 0c1d0c8 commit b1f2acd
Showing 11 changed files with 110 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/core/src/db/queries/activities.rs
Original file line number Diff line number Diff line change
@@ -57,3 +57,11 @@ pub fn list(
.load(conn)
.context("Failed to load activities")
}

#[cfg(test)]
mod tests {
#[test]
fn test_list() {
todo!("Test list()");
}
}
8 changes: 8 additions & 0 deletions crates/core/src/db/queries/bonding_changes.rs
Original file line number Diff line number Diff line change
@@ -54,3 +54,11 @@ pub fn list(
.load(conn)
.context("Failed to load enriched bonding changes")
}

#[cfg(test)]
mod tests {
#[test]
fn test_list() {
todo!("Test list()");
}
}
16 changes: 16 additions & 0 deletions crates/core/src/db/queries/charts.rs
Original file line number Diff line number Diff line change
@@ -136,3 +136,19 @@ pub fn total_volume_prices(
.load(conn)
.context("Failed to load average prices")
}

#[cfg(test)]
mod tests {
#[test]
fn test_floor_prices() {
todo!("Test floor_prices()");
}
#[test]
fn test_average_prices() {
todo!("Test average_prices()");
}
#[test]
fn test_total_volume_prices() {
todo!("Test total_volume_prices()");
}
}
8 changes: 8 additions & 0 deletions crates/core/src/db/queries/featured_listings.rs
Original file line number Diff line number Diff line change
@@ -88,3 +88,11 @@ pub fn list(
.load(conn)
.context("Failed to load featured listings")
}

#[cfg(test)]
mod tests {
#[test]
fn test_list() {
todo!("Test list()");
}
}
12 changes: 12 additions & 0 deletions crates/core/src/db/queries/feed_event.rs
Original file line number Diff line number Diff line change
@@ -370,3 +370,15 @@ pub fn list_relay(
.load(conn)
.context("Failed to load feed events")
}

#[cfg(test)]
mod tests {
#[test]
fn test_list() {
todo!("Test list()");
}
#[test]
fn test_list_relay() {
todo!("Test list_relay()");
}
}
13 changes: 13 additions & 0 deletions crates/core/src/db/queries/graph_connection.rs
Original file line number Diff line number Diff line change
@@ -69,3 +69,16 @@ pub fn list(
.load(conn)
.context("failed to load twitter enriched graph connections by addresses")
}

#[cfg(test)]
mod tests {
#[test]
fn test_connections() {
todo!("Test connections()");
}

#[test]
fn test_list() {
todo!("Test list()");
}
}
12 changes: 12 additions & 0 deletions crates/core/src/db/queries/metadatas.rs
Original file line number Diff line number Diff line change
@@ -468,3 +468,15 @@ pub fn activities(
.load(conn)
.context("Failed to load nft(s) activities")
}

#[cfg(test)]
mod tests {
#[test]
fn test_list() {
todo!("Test list()");
}
#[test]
fn test_activities() {
todo!("Test activities()");
}
}
1 change: 1 addition & 0 deletions crates/core/src/db/queries/nft_count.rs
Original file line number Diff line number Diff line change
@@ -313,5 +313,6 @@ mod tests {
let conn = connect();

std::mem::drop(super::store_creators(&conn, Vec::<String>::new()).unwrap());
todo!("Check that the result is non-empty");
}
}
16 changes: 16 additions & 0 deletions crates/core/src/db/queries/stats.rs
Original file line number Diff line number Diff line change
@@ -141,3 +141,19 @@ pub fn collection(
.load(conn)
.context("Failed to load collection mint stats")
}

#[cfg(test)]
mod tests {
#[test]
fn test_mint() {
todo!("Test mint()");
}
#[test]
fn test_market() {
todo!("Test market()");
}
#[test]
fn test_collection() {
todo!("Test collection()");
}
}
8 changes: 8 additions & 0 deletions crates/core/src/db/queries/wallet.rs
Original file line number Diff line number Diff line change
@@ -64,3 +64,11 @@ pub fn activities(conn: &Connection, address: impl ToSql<Text, Pg>) -> Result<Ve
.load(conn)
.context("Failed to load wallet(s) activities")
}

#[cfg(test)]
mod tests {
#[test]
fn test_activities() {
todo!("Test activities()");
}
}
8 changes: 8 additions & 0 deletions crates/graphql/src/schema/dataloaders/collection.rs
Original file line number Diff line number Diff line change
@@ -11,6 +11,14 @@ use tables::collection_stats;

use super::prelude::*;

#[cfg(test)]
mod tests {
#[test]
fn refactor_me() {
todo!("Move the sql_query call into indexer_core and add tests");
}
}

#[async_trait]
impl TryBatchFn<PublicKey<StoreCreator>, Vec<Nft>> for Batcher {
async fn load(

0 comments on commit b1f2acd

Please sign in to comment.