[test] adds testing to model and view logic