Sha256: cf33b6e8c60145aa8471677235a7292e7227cf1590f6f84f08de5770ebd8c327
Contents?: true
Size: 917 Bytes
Versions: 53
Compression:
Stored size: 917 Bytes
Contents
class Ey::Core::Client class Real def enable_feature(params={}) account_id = params["account"] feature_id = params["feature"]["id"] request( :method => :post, :path => "accounts/#{account_id}/features/#{feature_id}" ) end end # Real class Mock def enable_feature(params={}) account_id = params["account"] resource_id = params["feature"]["id"] account = self.data[:accounts][account_id] feature = self.data[:features][resource_id] account_url = url_for("/accounts/#{account_id}") feature["account"] = account_url response( :body => {"feature" => { "id" => feature[:id], "name" => feature[:name], "description" => feature[:description]} }, :status => 200 ) end end # Mock end # Ey::Core::Client
Version data entries
53 entries across 53 versions & 3 rubygems