new rspec tests forapi and cookie specs