File tree Expand file tree Collapse file tree 6 files changed +27
-25
lines changed
spec/unit/client/projects/cards Expand file tree Collapse file tree 6 files changed +27
-25
lines changed Original file line number Diff line number Diff line change 1414
1515 before do
1616 subject . oauth_token = OAUTH_TOKEN
17- stub_post ( request_path ) . with ( body : inputs )
18- . to_return ( body : body , status : status ,
19- headers : { content_type : "application/json; charset=utf-8" } )
17+ stub_post ( request_path ) . with ( body : inputs ) .
18+ to_return ( body : body , status : status ,
19+ headers : { content_type : "application/json; charset=utf-8" } )
2020 end
2121
2222 after { reset_authentication_for subject }
2828 context "for the authenticated user" do
2929 let ( :request_path ) { "/projects/columns/#{ column_id } /cards?access_token=#{ OAUTH_TOKEN } " }
3030
31- it "should create resource" do
31+ it "creates resource" do
3232 subject . create column_id , inputs
3333 a_post ( request_path ) . with ( body : inputs ) . should have_been_made
3434 end
3535
36- it "should return the resource" do
36+ it "returns the resource" do
3737 card = subject . create column_id , inputs
3838 expect ( card . note ) . to eq 'Add payload for delete Project column'
3939 end
4040
41- it "should return mash type" do
41+ it "returns mash type" do
4242 card = subject . create column_id , inputs
4343 expect ( card ) . to be_a Github ::ResponseWrapper
4444 end
Original file line number Diff line number Diff line change 22
33require 'spec_helper'
44
5- describe Github ::Client ::Projects ::Cards , '#delete' do
5+ RSpec . describe Github ::Client ::Projects ::Cards , '#delete' do
66 let ( :card_id ) { 1478 }
77 let ( :request_path ) { "/projects/columns/cards/#{ card_id } " }
88 let ( :body ) { '' }
99 let ( :status ) { 204 }
1010
1111 before do
12- stub_delete ( request_path ) . to_return ( body : body , status : status ,
13- headers : { content_type : "application/json; charset=utf-8" } )
12+ stub_delete ( request_path ) .
13+ to_return ( body : body , status : status ,
14+ headers : { content_type : "application/json; charset=utf-8" } )
1415 end
1516
1617 after { reset_authentication_for subject }
1718
1819 it { expect ( subject ) . to respond_to :remove }
1920
20- it "should delete the resource successfully" do
21+ it "deletes the resource successfully" do
2122 subject . delete card_id
2223 expect ( a_delete ( request_path ) ) . to have_been_made
2324 end
2425
25- it "should fail to delete resource without 'id' parameter" do
26+ it "fails to delete resource without 'id' parameter" do
2627 expect { subject . delete } . to raise_error ( ArgumentError )
2728 end
2829
Original file line number Diff line number Diff line change 99 let ( :status ) { 200 }
1010
1111 before do
12- stub_get ( request_path ) . to_return ( body : body , status : status ,
13- headers : { content_type : "application/json; charset=utf-8" } )
12+ stub_get ( request_path ) .
13+ to_return ( body : body , status : status ,
14+ headers : { content_type : "application/json; charset=utf-8" } )
1415 end
1516
1617 after { reset_authentication_for ( subject ) }
Original file line number Diff line number Diff line change 22
33require 'spec_helper'
44
5- describe Github ::Client ::Projects ::Cards , '#list' do
5+ RSpec . describe Github ::Client ::Projects ::Cards , '#list' do
66 let ( :column_id ) { 367 }
77 let ( :request_path ) { "/projects/columns/#{ column_id } /cards" }
88
Original file line number Diff line number Diff line change 1+ # encoding: utf-8
12# frozen_string_literal: true
23
34require 'spec_helper'
45
5- describe Github ::Client ::Projects ::Cards , '#move' do
6+ RSpec . describe Github ::Client ::Projects ::Cards , '#move' do
67 let ( :card_id ) { 1478 }
78 let ( :request_path ) { "/projects/columns/cards/#{ card_id } /moves" }
89 let ( :body ) { '' }
910 let ( :status ) { 204 }
1011 let ( :inputs ) do
11- {
12- position : "after:3"
13- }
12+ { position : "after:3" }
1413 end
1514
1615 before do
17- stub_post ( request_path ) . with ( body : inputs . to_json ) . to_return ( body : body , status : status ,
18- headers : { content_type : "application/json; charset=utf-8" } )
16+ stub_post ( request_path ) . with ( body : inputs . to_json ) .
17+ to_return ( body : body , status : status ,
18+ headers : { content_type : "application/json; charset=utf-8" } )
1919 end
2020
2121 after { reset_authentication_for subject }
2222
23- it "should move the resource successfully" do
23+ it "moves the resource successfully" do
2424 subject . move card_id , inputs
2525 expect ( a_post ( request_path ) ) . to have_been_made
2626 end
2727
28- it "should fail to move resource without 'id' parameter" do
28+ it "fails to move resource without 'id' parameter" do
2929 expect { subject . move inputs } . to raise_error ( ArgumentError )
3030 end
3131
Original file line number Diff line number Diff line change 1414 end
1515
1616 before do
17- stub_patch ( request_path ) . with ( body : inputs )
18- . to_return ( body : body , status : status ,
19- headers : { content_type : 'application/json; charset=utf-8' } )
17+ stub_patch ( request_path ) . with ( body : inputs ) .
18+ to_return ( body : body , status : status ,
19+ headers : { content_type : 'application/json; charset=utf-8' } )
2020 end
2121
2222 after { reset_authentication_for ( subject ) }
You can’t perform that action at this time.
0 commit comments