Consistent naming
This commit is contained in:
parent
0ea6cb578c
commit
22a21a5cc4
@ -173,7 +173,7 @@ impl<BLE: IBeetsLibraryExecutor> ILibraryPrivate for BeetsLibrary<BLE> {
|
||||
mod tests {
|
||||
use mockall::predicate;
|
||||
|
||||
use crate::library::testlib::{BEETS_OUTPUT, LIBRARY_ITEMS};
|
||||
use crate::library::testlib::{LIBRARY_BEETS, LIBRARY_ITEMS};
|
||||
|
||||
use super::*;
|
||||
|
||||
@ -247,7 +247,7 @@ mod tests {
|
||||
fn test_list() {
|
||||
let arguments = vec!["ls".to_string(), LIST_FORMAT_ARG.to_string()];
|
||||
let expected: &Vec<Item> = LIBRARY_ITEMS.as_ref();
|
||||
let result = Ok(BEETS_OUTPUT.to_owned());
|
||||
let result = Ok(LIBRARY_BEETS.to_owned());
|
||||
|
||||
let mut executor = MockIBeetsLibraryExecutor::new();
|
||||
executor
|
||||
@ -300,7 +300,7 @@ mod tests {
|
||||
#[test]
|
||||
fn invalid_data_split() {
|
||||
let arguments = vec!["ls".to_string(), LIST_FORMAT_ARG.to_string()];
|
||||
let mut output: Vec<String> = BEETS_OUTPUT.to_owned();
|
||||
let mut output: Vec<String> = LIBRARY_BEETS.to_owned();
|
||||
let invalid_string = output[2]
|
||||
.split(LIST_FORMAT_SEPARATOR)
|
||||
.map(|s| s.to_owned())
|
||||
@ -325,7 +325,7 @@ mod tests {
|
||||
#[test]
|
||||
fn invalid_data_format() {
|
||||
let arguments = vec!["ls".to_string(), LIST_FORMAT_ARG.to_string()];
|
||||
let mut output: Vec<String> = BEETS_OUTPUT.to_owned();
|
||||
let mut output: Vec<String> = LIBRARY_BEETS.to_owned();
|
||||
let mut invalid_string = output[2]
|
||||
.split(LIST_FORMAT_SEPARATOR)
|
||||
.map(|s| s.to_owned())
|
||||
|
@ -3,7 +3,7 @@ use once_cell::sync::Lazy;
|
||||
use crate::library::Item;
|
||||
use crate::Format;
|
||||
|
||||
macro_rules! beets_output {
|
||||
macro_rules! library_beets {
|
||||
() => {
|
||||
vec![
|
||||
String::from("album_artist a -*^- -*^- 1998 -*^- album_title a.a -*^- 1 -*^- track a.a.1 -*^- artist a.a.1 -*^- FLAC -*^- 992"),
|
||||
@ -188,5 +188,5 @@ macro_rules! library_items {
|
||||
};
|
||||
}
|
||||
|
||||
pub static BEETS_OUTPUT: Lazy<Vec<String>> = Lazy::new(|| beets_output!());
|
||||
pub static LIBRARY_BEETS: Lazy<Vec<String>> = Lazy::new(|| library_beets!());
|
||||
pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| library_items!());
|
||||
|
Loading…
Reference in New Issue
Block a user