spec/features/cms/blogs/authors/author_api_spec.rb in hubspot-api-client-11.1.1 vs spec/features/cms/blogs/authors/author_api_spec.rb in hubspot-api-client-11.2.0

- old
+ new

@@ -18,11 +18,11 @@ let(:params) { { auth_names: 'ouath2' } } let(:input_string) { 'test_input_string' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } end it 'sets auth names from params' do expect(new_options[:auth_names]).to eq params[:auth_names] end @@ -45,11 +45,11 @@ let(:params) { { auth_names: 'ouath2' } } let(:object_id) { 'test_object_id' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [{ new_options: new_options, path: local_var_path }, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [{ new_options: new_options, path: local_var_path }, 200, ''] } end it 'sets auth names from params' do expect(request[:new_options][:auth_names]).to eq params[:auth_names] end @@ -72,11 +72,11 @@ let(:params) { { auth_names: 'ouath2' } } let(:blog_author) { 'test_blog_author' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } end it 'sets auth names from params' do expect(new_options[:auth_names]).to eq params[:auth_names] end @@ -99,11 +99,11 @@ let(:params) { { auth_names: 'ouath2' } } let(:blog_author) { 'test_blog_author' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } end it 'sets auth names from params' do expect(new_options[:auth_names]).to eq params[:auth_names] end @@ -126,11 +126,11 @@ let(:params) { { auth_names: 'ouath2' } } let(:object_id) { 'test_object_id' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [{ new_options: new_options, path: local_var_path }, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [{ new_options: new_options, path: local_var_path }, 200, ''] } end it 'sets auth names from params' do expect(request[:new_options][:auth_names]).to eq params[:auth_names] end @@ -152,11 +152,11 @@ subject(:new_options_auth_names) { api.get_page(params)[:auth_names] } let(:params) { { auth_names: 'ouath2' } } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } end it { is_expected.to eq params[:auth_names] } context 'with hapikey' do @@ -171,11 +171,11 @@ let(:params) { { auth_names: 'ouath2' } } let(:input_string) { 'test_input_string' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } end it 'sets auth_names from params' do expect(new_options[:auth_names]).to eq params[:auth_names] end @@ -198,11 +198,11 @@ let(:params) { { auth_names: 'ouath2' } } let(:input_json_node) { 'test_input_json_node' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [new_options, 200, ''] } end it 'sets auth_names from params' do expect(new_options[:auth_names]).to eq params[:auth_names] end @@ -226,10 +226,10 @@ let(:params) { { auth_names: 'ouath2' } } let(:object_id) { 'test_object_id' } let(:input_json_node) { 'test_input_json_node' } before do - api.api_client.stub(:call_api) { |method, local_var_path, new_options| [{ new_options: new_options, path: local_var_path }, 200, ''] } + allow(api.api_client).to receive(:call_api) { |method, local_var_path, new_options| [{ new_options: new_options, path: local_var_path }, 200, ''] } end it 'sets auth names from params' do expect(request[:new_options][:auth_names]).to eq params[:auth_names] end