rspec 3-ify spec/gem_integration
refs CNVS-16239 Change-Id: I38f598583c7208973f6ab855352d4e7be4461e71 Reviewed-on: https://gerrit.instructure.com/42664 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Paul Hinze <paulh@instructure.com> Product-Review: Braden Anderson <braden@instructure.com> QA-Review: Braden Anderson <braden@instructure.com>
This commit is contained in:
parent
5a810afcef
commit
67c8dc63ed
|
@ -44,11 +44,11 @@ describe AdobeConnectConference do
|
||||||
it 'should generate an admin url using unique format if stored' do
|
it 'should generate an admin url using unique format if stored' do
|
||||||
stored_url = 'canvas-mtg-ACCOUNT_ID-ID-CREATED_SECONDS'
|
stored_url = 'canvas-mtg-ACCOUNT_ID-ID-CREATED_SECONDS'
|
||||||
@conference.settings[:meeting_url_id] = stored_url
|
@conference.settings[:meeting_url_id] = stored_url
|
||||||
@conference.admin_join_url(@user).should == "http://connect.example.com/#{stored_url}"
|
expect(@conference.admin_join_url(@user)).to eq "http://connect.example.com/#{stored_url}"
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should generate an admin url using legacy format' do
|
it 'should generate an admin url using legacy format' do
|
||||||
@conference.admin_join_url(@user).should == "http://connect.example.com/canvas-meeting-#{@conference.id}"
|
expect(@conference.admin_join_url(@user)).to eq "http://connect.example.com/canvas-meeting-#{@conference.id}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,12 +24,12 @@ describe Canvas::Plugins::Validators::AdobeConnectValidator do
|
||||||
subject { Canvas::Plugins::Validators::AdobeConnectValidator }
|
subject { Canvas::Plugins::Validators::AdobeConnectValidator }
|
||||||
|
|
||||||
it 'should allow an empty hash' do
|
it 'should allow an empty hash' do
|
||||||
subject.validate({}, plugin_setting).should eql Hash.new
|
expect(subject.validate({}, plugin_setting)).to eql Hash.new
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should error on missing keys' do
|
it 'should error on missing keys' do
|
||||||
plugin_setting.expects(:errors).returns(stub(:add_to_base => true))
|
plugin_setting.expects(:errors).returns(stub(:add_to_base => true))
|
||||||
subject.validate({:domain => 'example.com'}, plugin_setting).should be_false
|
expect(subject.validate({:domain => 'example.com'}, plugin_setting)).to be_falsey
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should pass if all keys exist' do
|
it 'should pass if all keys exist' do
|
||||||
|
@ -41,6 +41,6 @@ describe Canvas::Plugins::Validators::AdobeConnectValidator do
|
||||||
:use_sis_ids => true
|
:use_sis_ids => true
|
||||||
}
|
}
|
||||||
|
|
||||||
subject.validate(valid_keys, plugin_setting).should eql valid_keys
|
expect(subject.validate(valid_keys, plugin_setting)).to eql valid_keys
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -44,31 +44,31 @@ describe CanvasConnect::MeetingArchive do
|
||||||
subject { CanvasConnect::MeetingArchive.retrieve(38230, MockClient.new).first }
|
subject { CanvasConnect::MeetingArchive.retrieve(38230, MockClient.new).first }
|
||||||
|
|
||||||
it "returns the correct number" do
|
it "returns the correct number" do
|
||||||
CanvasConnect::MeetingArchive.retrieve(38230, MockClient.new).count.should == 2
|
expect(CanvasConnect::MeetingArchive.retrieve(38230, MockClient.new).count).to eq 2
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the name" do
|
it "returns the name" do
|
||||||
subject.name.should == 'Test Recording'
|
expect(subject.name).to eq 'Test Recording'
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the url_path" do
|
it "returns the url_path" do
|
||||||
subject.url_path.should == '/p3u8rj0rvuj/'
|
expect(subject.url_path).to eq '/p3u8rj0rvuj/'
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the date_begin" do
|
it "returns the date_begin" do
|
||||||
subject.date_begin.should == '2013-09-05T12:13:03.387-06:00'
|
expect(subject.date_begin).to eq '2013-09-05T12:13:03.387-06:00'
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the date end" do
|
it "returns the date end" do
|
||||||
subject.date_end.should == '2013-09-05T12:13:28.970-06:00'
|
expect(subject.date_end).to eq '2013-09-05T12:13:28.970-06:00'
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the date created" do
|
it "returns the date created" do
|
||||||
subject.date_created.should == '2013-09-05T12:13:03.387-06:00'
|
expect(subject.date_created).to eq '2013-09-05T12:13:03.387-06:00'
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns the date modified" do
|
it "returns the date modified" do
|
||||||
subject.date_modified.should == '2013-09-05T12:13:29.727-06:00'
|
expect(subject.date_modified).to eq '2013-09-05T12:13:29.727-06:00'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -21,7 +21,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
||||||
describe "canvas_stringex" do
|
describe "canvas_stringex" do
|
||||||
|
|
||||||
it "requires the syck yaml parsers" do
|
it "requires the syck yaml parsers" do
|
||||||
YAML::ENGINE.yamler.should == 'syck'
|
expect(YAML::ENGINE.yamler).to eq 'syck'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue