Sha256: 0dc0830c0c4b50c7bd558772976104a93957f48e49256bb0077dcf797032e755
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
require File.expand_path("../spec_helper", File.dirname(__FILE__)) describe Youroom::MarkRead do let :mark_read do Youroom::MarkRead.new(access_token, [1,2,3]) end describe "#initialize" do describe "when can create instance" do context "ids are Array class" do subject { mark_read } it { should be_a(Youroom::MarkRead) } its(:url) { should == Youroom::BASE_URL } its(:ids) { should == ["1","2","3"] } its(:access_token) { should == access_token } end context "ids are String instance" do subject { Youroom::MarkRead.new(access_token, "1") } its(:ids) { should == ["1"] } end context "ids are Integer instance" do subject { Youroom::MarkRead.new(access_token, 1) } its(:ids) { should == ["1"] } end end end context "#path" do subject { mark_read } its(:path) { should == File.join(mark_read.url, 'mark_read') } end context "#params" do subject { mark_read } its(:params) { should == { 'ids[]' => '1,2,3' } } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
youroom_api-0.1.2 | spec/youroom_api/mark_read_spec.rb |