Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #255 from bellroy/master
Browse files Browse the repository at this point in the history
Merge branch master into stable
  • Loading branch information
trike-deploy authored Aug 1, 2023
2 parents e2cba43 + b93950c commit 3c2c949
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 119 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ group :test do
gem 'launchy'
gem 'rails-controller-testing'
gem 'shoulda-matchers'
gem 'webdrivers'
end

group :linux, :production do
Expand Down
12 changes: 0 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ GEM
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.5)
rouge (4.1.2)
rspec (3.12.0)
rspec-core (~> 3.12.0)
Expand All @@ -358,7 +357,6 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rubyzip (2.3.2)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
Expand All @@ -369,10 +367,6 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (4.10.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sentry-rails (5.9.0)
railties (>= 5.0)
sentry-ruby (~> 5.9.0)
Expand Down Expand Up @@ -414,11 +408,6 @@ GEM
uuidtools (2.2.0)
warden (1.2.9)
rack (>= 2.0.9)
webdrivers (5.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down Expand Up @@ -495,7 +484,6 @@ DEPENDENCIES
timecop
uglifier
uuidtools
webdrivers
whenever
wirble
zeitwerk (< 2.6.4)
Expand Down
5 changes: 5 additions & 0 deletions app/serializers/prediction_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class PredictionSerializer < ActiveModel::Serializer
:mean_confidence,
:outcome,
:prediction_group_id,
:last_judgement_at,
:updated_at,
:uuid,
:version,
Expand All @@ -23,4 +24,8 @@ class PredictionSerializer < ActiveModel::Serializer
def creator_label
object.creator.to_s
end

def last_judgement_at
object.judged_at
end
end
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@
};
});
}

81 changes: 0 additions & 81 deletions spec/features/prediction_groups_spec.rb

This file was deleted.

4 changes: 4 additions & 0 deletions spec/requests/api/my_predictions_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@
predictions = json_hash['predictions']
expect(predictions.length).to eq 2

before_judgment_timestamp = Time.now - 1.second
another_prediction.judgements.create!(outcome: true)

get url, params: params.merge(page_size: 1, page: 1)
json_hash = JSON.parse(response.body)
predictions = json_hash['predictions']
actor = json_hash['user']
expect(predictions.length).to eq 1
expect(predictions.first['description']).to eq another_prediction.description
expect(Time.parse(predictions.first['last_judgement_at']) >= before_judgment_timestamp).to be true
expect(actor['email']).to eq user.email

get url, params: params.merge(page_size: 1, page: 2)
Expand Down
24 changes: 0 additions & 24 deletions spec/support/feature_spec_dependencies.rb

This file was deleted.

0 comments on commit 3c2c949

Please sign in to comment.