diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-07-27 19:03:06 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-08-15 13:17:58 -0500 |
commit | 95419679f23f0628d1885dd9656cc159e9d55ea9 (patch) | |
tree | 4ec924b2f7dfbfd9e0390065d430c9daff8984bb /spec/factories/user_agent_details.rb | |
parent | 640e485c6aa19f8fca1be7fc45e7f65da4469fbd (diff) | |
download | gitlab-ce-95419679f23f0628d1885dd9656cc159e9d55ea9.tar.gz |
Lay the ground works to submit information to Akismet
- New concern `AkismetSubmittable` to allow issues and other `Spammable` models to be submitted to Akismet.
- New model `UserAgentDetail` to store information needed for Akismet.
- Services needed for their creation and tests.
Diffstat (limited to 'spec/factories/user_agent_details.rb')
-rw-r--r-- | spec/factories/user_agent_details.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/user_agent_details.rb b/spec/factories/user_agent_details.rb new file mode 100644 index 00000000000..5fc40915911 --- /dev/null +++ b/spec/factories/user_agent_details.rb @@ -0,0 +1,10 @@ +FactoryGirl.define do + factory :user_agent_detail do + ip_address '127.0.0.1' + user_agent 'AppleWebKit/537.36' + + trait :on_issue do + association :subject, factory: :issue + end + end +end |