some more dep warnings
This commit is contained in:
parent
7c3c6bd1a9
commit
a02995e357
|
@ -103,7 +103,7 @@ describe Build, truncation: true do
|
||||||
subject { Build.older_than(Build.new(number: 3)) }
|
subject { Build.older_than(Build.new(number: 3)) }
|
||||||
|
|
||||||
it "should limit the results" do
|
it "should limit the results" do
|
||||||
should have(2).items
|
expect(subject.size).to eq(2)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should return older than the passed build" do
|
it "should return older than the passed build" do
|
||||||
|
@ -115,7 +115,7 @@ describe Build, truncation: true do
|
||||||
subject { Build.older_than(3) }
|
subject { Build.older_than(3) }
|
||||||
|
|
||||||
it "should limit the results" do
|
it "should limit the results" do
|
||||||
should have(2).items
|
expect(subject.size).to eq(2)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should return older than the passed build" do
|
it "should return older than the passed build" do
|
||||||
|
@ -127,7 +127,7 @@ describe Build, truncation: true do
|
||||||
subject { Build.older_than() }
|
subject { Build.older_than() }
|
||||||
|
|
||||||
it "should limit the results" do
|
it "should limit the results" do
|
||||||
should have(2).item
|
expect(subject.size).to eq(2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -137,7 +137,7 @@ describe Build, truncation: true do
|
||||||
3.times { Factory(:build) }
|
3.times { Factory(:build) }
|
||||||
Build.stubs(:per_page).returns(1)
|
Build.stubs(:per_page).returns(1)
|
||||||
|
|
||||||
Build.descending.paged({}).should have(1).item
|
expect(Build.descending.paged({}).size).to eq(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'uses an offset' do
|
it 'uses an offset' do
|
||||||
|
@ -145,7 +145,7 @@ describe Build, truncation: true do
|
||||||
Build.stubs(:per_page).returns(1)
|
Build.stubs(:per_page).returns(1)
|
||||||
|
|
||||||
builds = Build.descending.paged({page: 2})
|
builds = Build.descending.paged({page: 2})
|
||||||
builds.should have(1).item
|
expect(builds.size).to eq(1)
|
||||||
builds.first.number.should == '2'
|
builds.first.number.should == '2'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#
|
#
|
||||||
# it 'finishes the job' do
|
# it 'finishes the job' do
|
||||||
# job.force_finish
|
# job.force_finish
|
||||||
# job.finished?.should be_true
|
# job.finished?.should be_truthy
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -48,8 +48,7 @@ describe Travis::Services::CancelBuild do
|
||||||
it 'should not be able to cancel job if user does not have any permissions' do
|
it 'should not be able to cancel job if user does not have any permissions' do
|
||||||
user.permissions.destroy_all
|
user.permissions.destroy_all
|
||||||
|
|
||||||
service.can_cancel?.should be_false
|
service.can_cancel?.should be false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe Travis::Services::CancelJob do
|
||||||
it 'should not be able to cancel job if user does not have pull permission' do
|
it 'should not be able to cancel job if user does not have pull permission' do
|
||||||
user.permissions.destroy_all
|
user.permissions.destroy_all
|
||||||
|
|
||||||
service.can_cancel?.should be_false
|
service.can_cancel?.should be false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,12 +56,12 @@ describe Travis::Services::FindBuild do
|
||||||
# describe 'final?' do
|
# describe 'final?' do
|
||||||
# it 'returns true if the build is finished' do
|
# it 'returns true if the build is finished' do
|
||||||
# build.update_attributes!(:state => :errored)
|
# build.update_attributes!(:state => :errored)
|
||||||
# service.final?.should be_true
|
# service.final?.should be_truthy
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# it 'returns false if the build is not finished' do
|
# it 'returns false if the build is not finished' do
|
||||||
# build.update_attributes!(:state => :started)
|
# build.update_attributes!(:state => :started)
|
||||||
# service.final?.should be_false
|
# service.final?.should be false
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|
|
@ -50,12 +50,12 @@ describe Travis::Services::FindJob do
|
||||||
# describe 'final?' do
|
# describe 'final?' do
|
||||||
# it 'returns true if the job is finished' do
|
# it 'returns true if the job is finished' do
|
||||||
# job.update_attributes!(state: :errored)
|
# job.update_attributes!(state: :errored)
|
||||||
# service.final?.should be_true
|
# service.final?.should be_truthy
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# it 'returns false if the job is not finished' do
|
# it 'returns false if the job is not finished' do
|
||||||
# job.update_attributes!(state: :started)
|
# job.update_attributes!(state: :started)
|
||||||
# service.final?.should be_false
|
# service.final?.should be false
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,12 +31,12 @@ describe Travis::Services::FindLog do
|
||||||
# describe 'final?' do
|
# describe 'final?' do
|
||||||
# it 'returns true if the job is finished' do
|
# it 'returns true if the job is finished' do
|
||||||
# log.job.update_attributes!(:state => :finished)
|
# log.job.update_attributes!(:state => :finished)
|
||||||
# service.final?.should be_true
|
# service.final?.should be_truthy
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# it 'returns false if the job is not finished' do
|
# it 'returns false if the job is not finished' do
|
||||||
# log.job.update_attributes!(:state => :started)
|
# log.job.update_attributes!(:state => :started)
|
||||||
# service.final?.should be_false
|
# service.final?.should be false
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@ describe Travis::Services::RegenerateRepoKey do
|
||||||
it 'does not regenerate key' do
|
it 'does not regenerate key' do
|
||||||
user.permissions.destroy_all
|
user.permissions.destroy_all
|
||||||
repo.expects(:regenerate_key!).never
|
repo.expects(:regenerate_key!).never
|
||||||
service.run.should be_false
|
service.run.should be_falsey
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -46,8 +46,8 @@ describe Travis::Services::RemoveLog do
|
||||||
it 'runs successfully' do
|
it 'runs successfully' do
|
||||||
result = service.run
|
result = service.run
|
||||||
result.removed_by.should == user
|
result.removed_by.should == user
|
||||||
result.removed_at.should be_true
|
result.removed_at.should be_truthy
|
||||||
result.should be_true
|
result.should be_truthy
|
||||||
end
|
end
|
||||||
|
|
||||||
it "updates logs with desired information" do
|
it "updates logs with desired information" do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user