lib/heroku/api/mock/collaborators.rb in heroku-api-0.1.1 vs lib/heroku/api/mock/collaborators.rb in heroku-api-0.1.2

- old
+ new

@@ -8,26 +8,26 @@ app, email, _ = request_params[:captures][:path] with_mock_app(mock_data, app) do if collaborator_data = get_mock_collaborator(mock_data, app, email) mock_data[:collaborators][app].delete(collaborator_data) { - :body => Heroku::API::Mock.gzip("#{email} has been removed as collaborator on #{app}"), + :body => "#{email} has been removed as collaborator on #{app}", :status => 200 } else - { :body => Heroku::API::Mock.gzip('User not found.'), :status => 404 } + { :body => 'User not found.', :status => 404 } end end end # stub GET /apps/:app/:collaborators Excon.stub(:expects => 200, :method => :get, :path => %r{^/apps/([^/]+)/collaborators}) do |params| request_params, mock_data = parse_stub_params(params) app, _ = request_params[:captures][:path] with_mock_app(mock_data, app) do { - :body => Heroku::API::Mock.json_gzip(mock_data[:collaborators][app]), + :body => Heroku::API::OkJson.encode(mock_data[:collaborators][app]), :status => 200 } end end @@ -37,10 +37,10 @@ app, _ = request_params[:captures][:path] email = request_params[:query]['collaborator[email]'] with_mock_app(mock_data, app) do mock_data[:collaborators][app] |= [{'access' => 'edit', 'email' => email}] { - :body => Heroku::API::Mock.gzip("#{email} added as a collaborator on #{app}."), + :body => "#{email} added as a collaborator on #{app}.", :status => 200 } # Existing user response #{ # :body => "#{email} added as a collaborator on #{app}",