MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_list_views

Function test_list_views

atomic-repository/src/repository/tests/view_tests.rs:50–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49#[test]
50fn test_list_views() {
51 let (_temp_dir, mut repo) = create_temp_repo();
52
53 // Should have default "dev" view
54 let views = repo.list_views().unwrap();
55 assert!(views.contains(&"dev".to_string()));
56
57 // Create additional views
58 repo.create_view("feature-a").unwrap();
59 repo.create_view("feature-b").unwrap();
60
61 let views = repo.list_views().unwrap();
62 assert_eq!(views.len(), 3);
63 assert!(views.contains(&"dev".to_string()));
64 assert!(views.contains(&"feature-a".to_string()));
65 assert!(views.contains(&"feature-b".to_string()));
66}
67
68#[test]
69fn test_default_view_name() {

Callers

nothing calls this directly

Calls 4

create_temp_repoFunction · 0.85
unwrapMethod · 0.45
list_viewsMethod · 0.45
create_viewMethod · 0.45

Tested by

no test coverage detected