#345: fixed product_build_lists_controller_spec
This commit is contained in:
parent
ab0085b618
commit
9102042d6e
|
@ -70,7 +70,7 @@ class ProductBuildList < ActiveRecord::Base
|
|||
scope :for_status, ->(status) { where(status: status) }
|
||||
scope :for_user, ->(user) { where(user_id: user.id) }
|
||||
scope :scoped_to_product_name, ->(product_name) { joins(:product).where('products.name LIKE ?', "%#{product_name}%") }
|
||||
scope :recent, -> { order(updated_at: desc) }
|
||||
scope :recent, -> { order(updated_at: :desc) }
|
||||
scope :outdated, -> {
|
||||
where(not_delete: false).
|
||||
where("(#{table_name}.created_at < ? AND #{table_name}.autostarted is TRUE) OR #{table_name}.created_at < ?",
|
||||
|
|
|
@ -97,9 +97,10 @@ describe Platforms::ProductBuildListsController do
|
|||
|
||||
context 'crud' do
|
||||
|
||||
before(:each) do
|
||||
@product = FactoryGirl.create(:product)
|
||||
before do
|
||||
FactoryGirl.create(:arch, name: 'x86_64')
|
||||
@arch = FactoryGirl.create(:arch)
|
||||
@product = FactoryGirl.create(:product)
|
||||
@pbl = FactoryGirl.create(:product_build_list, product: @product)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue