spec/baruwa_domains_spec.rb in baruwa-0.0.1 vs spec/baruwa_domains_spec.rb in baruwa-0.0.2

- old
+ new

@@ -32,11 +32,11 @@ it 'should get domains' do stub_request(:get, "https://testbaruwa.com/api/v1/domains"). with(:body => false, :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json', - 'User-Agent'=>'BaruwaAPI/Ruby', + 'User-Agent'=>'BaruwaAPI-Ruby', 'Authorization'=>'Bearer 6e2347bc-278e-42f6-a84b-fa1766140cbd'}). to_return(:status => 200, :body => "", :headers => {}) @baruwapi.get_domains() expect(WebMock).to have_requested(:get, "#{@baruwapi.instance_variable_get(:@baruwa_url)}/domains") end @@ -45,11 +45,11 @@ domainid = 10 stub_request(:get, "https://testbaruwa.com/api/v1/domains/#{domainid}"). with(:body => false, :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json', - 'User-Agent'=>'BaruwaAPI/Ruby', + 'User-Agent'=>'BaruwaAPI-Ruby', 'Authorization'=>'Bearer 6e2347bc-278e-42f6-a84b-fa1766140cbd'}). to_return(:status => 200, :body => "", :headers => {}) @baruwapi.get_domain(domainid) expect(WebMock).to have_requested(:get, "#{@baruwapi.instance_variable_get(:@baruwa_url)}/domains/#{domainid}") end @@ -57,11 +57,11 @@ it 'should create a domain' do stub_request(:post, "https://testbaruwa.com/api/v1/domains"). with(:body => @baruwapi.get_params(dom), :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json', - 'User-Agent'=>'BaruwaAPI/Ruby', + 'User-Agent'=>'BaruwaAPI-Ruby', 'Authorization'=>'Bearer 6e2347bc-278e-42f6-a84b-fa1766140cbd'}). to_return(:status => 200, :body => "", :headers => {}) @baruwapi.create_domain(dom) expect(WebMock).to have_requested(:post, "#{@baruwapi.instance_variable_get(:@baruwa_url)}/domains") end @@ -70,11 +70,11 @@ domainid = 10 stub_request(:put, "https://testbaruwa.com/api/v1/domains/#{domainid}"). with(:body => @baruwapi.get_params(dom), :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json', - 'User-Agent'=>'BaruwaAPI/Ruby', + 'User-Agent'=>'BaruwaAPI-Ruby', 'Authorization'=>'Bearer 6e2347bc-278e-42f6-a84b-fa1766140cbd'}). to_return(:status => 200, :body => "", :headers => {}) @baruwapi.update_domain(domainid, dom) expect(WebMock).to have_requested(:put, "#{@baruwapi.instance_variable_get(:@baruwa_url)}/domains/#{domainid}") end @@ -83,10 +83,10 @@ domainid = 10 stub_request(:delete, "https://testbaruwa.com/api/v1/domains/#{domainid}"). with(:body => false, :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json', - 'User-Agent'=>'BaruwaAPI/Ruby', + 'User-Agent'=>'BaruwaAPI-Ruby', 'Authorization'=>'Bearer 6e2347bc-278e-42f6-a84b-fa1766140cbd'}). to_return(:status => 200, :body => "", :headers => {}) @baruwapi.delete_domain(domainid) expect(WebMock).to have_requested(:delete, "#{@baruwapi.instance_variable_get(:@baruwa_url)}/domains/#{domainid}") end