()
| 950 | |
| 951 | #[test] |
| 952 | fn test_detect_context_with_view() { |
| 953 | let txn = MockTxn; |
| 954 | let working_copy = Memory::new(); |
| 955 | let change_store = MemoryChangeStore::new(); |
| 956 | let view = ViewState::default(); |
| 957 | |
| 958 | let ctx = DetectContext::new(&txn, &working_copy, &change_store).with_view(&view); |
| 959 | |
| 960 | assert!(ctx.view().is_some()); |
| 961 | assert_eq!(ctx.view().unwrap().name, view.name); |
| 962 | } |
| 963 | |
| 964 | #[test] |
| 965 | fn test_detect_context_with_options() { |