Add minimal test for basic hackathon operations and enhance test utilities
- Introduced a new test module for hackathon-related functionality. - Implemented a basic test for creating a hackathon using a mock repository. - Enhanced the test utilities in `lib.rs` for better request handling and response extraction. - Added a `ServiceClient` struct to facilitate HTTP requests in tests. - Created a `RequestBuilder` to streamline building and sending requests with headers and JSON bodies.
This commit is contained in:
@@ -101,10 +101,9 @@ impl<'a> QueryListBuilder<'a> {
|
||||
// Bind parameters for both data and count queries.
|
||||
// It's assumed that the parameters are named consistently and applied to both.
|
||||
// The ListQueryBuilder already uses $search, $per_page, $start, $filter.
|
||||
if let Some(search) = &self.meta.search {
|
||||
if !search.is_empty() {
|
||||
query_exec = query_exec.bind(("search", search.to_lowercase()));
|
||||
}
|
||||
if let Some(search) = &self.meta.search
|
||||
&& !search.is_empty() {
|
||||
query_exec = query_exec.bind(("search", search.to_lowercase()));
|
||||
}
|
||||
if let Some(filter_val) = &self.meta.filter {
|
||||
query_exec = crate::bind_filter_value(query_exec, filter_val.clone());
|
||||
|
||||
Reference in New Issue
Block a user