add rspec for api_action