added a karma test for clear data functon