FIX: explicitly order submission list for specs
Dieser Commit ist enthalten in:
Ursprung
578c92e90e
Commit
e02f78569a
3 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
|
@ -131,6 +131,8 @@ class CustomWizard::Submission
|
||||||
params[:key] = list_actor_id if list_actor_id
|
params[:key] = list_actor_id if list_actor_id
|
||||||
|
|
||||||
query = PluginStoreRow.where(params)
|
query = PluginStoreRow.where(params)
|
||||||
|
query = query.order(order_by) if order_by
|
||||||
|
|
||||||
result = OpenStruct.new(submissions: [], total: nil)
|
result = OpenStruct.new(submissions: [], total: nil)
|
||||||
|
|
||||||
query.each do |record|
|
query.each do |record|
|
||||||
|
|
|
@ -157,7 +157,7 @@ class CustomWizard::Subscription
|
||||||
return :none unless subscribed?
|
return :none unless subscribed?
|
||||||
return :business if business?
|
return :business if business?
|
||||||
return :standard if standard?
|
return :standard if standard?
|
||||||
return :community if community?
|
:community if community?
|
||||||
end
|
end
|
||||||
|
|
||||||
def subscribed?
|
def subscribed?
|
||||||
|
|
|
@ -40,7 +40,7 @@ describe CustomWizard::SubmissionSerializer do
|
||||||
|
|
||||||
it "should return field values, types and labels" do
|
it "should return field values, types and labels" do
|
||||||
wizard = CustomWizard::Wizard.create(template_json["id"])
|
wizard = CustomWizard::Wizard.create(template_json["id"])
|
||||||
list = CustomWizard::Submission.list(wizard, page: 0)
|
list = CustomWizard::Submission.list(wizard, page: 0, order_by: 'id')
|
||||||
|
|
||||||
json_array = ActiveModel::ArraySerializer.new(
|
json_array = ActiveModel::ArraySerializer.new(
|
||||||
list.submissions,
|
list.submissions,
|
||||||
|
|
Laden …
In neuem Issue referenzieren