Commit Graph

55 Commits

Author SHA1 Message Date
c68bcfeb72 Improve spec. 2017-01-03 15:36:36 +08:00
ad4a96d387 FIX: Only send membership request to the last 5 active group owners. 2017-01-03 15:33:57 +08:00
5aee2673c7 FIX: Push null fields to last when sorting group members. 2016-12-22 14:55:24 +08:00
8551d821a0 FEATURE: Add site setting to disable group directory. 2016-12-22 14:14:22 +08:00
28befcb5d4 Fix specs. 2016-12-21 21:21:39 +08:00
9db5d5b6a7 FIX: Incorrect serializer for groups page. 2016-12-20 15:44:22 +08:00
7c7c233c1c FIX: Can't update Groups#allow_membership_requests in admin. 2016-12-20 15:14:35 +08:00
502e114c60 FIX: Incorrect count when loading more groups. 2016-12-20 14:39:44 +08:00
193f8301a4 FIX: Do not show automatic groups to normal users. 2016-12-20 14:26:49 +08:00
18c8323987 FIX: Incorrect path for redirect. 2016-12-19 18:12:15 +08:00
ab6843dcde FIX: username route was broken 2016-12-16 23:56:22 +05:30
d8541c589a FIX: Incorrect route for updating username. 2016-12-17 00:23:12 +08:00
13c344245d Merge pull request #4603 from tgxworld/group_index_page
FEATURE: Add groups page.
2016-12-14 23:26:05 +08:00
20f9aad539 Merge pull request #4599 from tgxworld/remove_rspec_given
Remove RSpec given.
2016-12-14 17:42:30 +08:00
4b940dc8bd FEATURE: Add groups page. 2016-12-14 17:27:47 +08:00
18f400e652 Remove RSpec given. 2016-12-14 10:29:22 +08:00
2686ee5ab2 FIX: Admin can't add/remove public group users. 2016-12-13 16:39:44 +08:00
43ee9f884e FEATURE: Add Group#full_name. 2016-12-13 16:16:26 +08:00
da7009a968 FEATURE: Add request membership button for allowed groups. 2016-12-12 22:48:08 +08:00
05f55dbc10 FEATURE: Group logs. 2016-12-12 17:29:54 +08:00
be5b5f6bea FEATURE: Public groups. 2016-12-12 17:00:30 +08:00
b9b4b0c175 FIX: Members should be ordered by username. 2016-12-08 14:27:38 +08:00
a2da2971af FEATURE: Allow columns on group members page to be sortable. 2016-12-08 10:49:12 +08:00
545dfa7191 FEATURE: Allow group owners to edit title. 2016-12-07 10:26:28 +08:00
adb7fcb6b3 FEATURE: Add bio to group page. 2016-12-05 16:58:04 +08:00
31acd311e5 FEATURE: Allow group owners to edit group name and avatar flair. 2016-12-05 14:27:46 +08:00
559918c6c6 PERF: Add endpoint to check if a group can be mentioned by user. 2016-11-26 02:20:46 +08:00
bf683178a8 FIX: Remove tag plugin code from tag hashtag check. 2016-08-02 10:59:12 +08:00
d62f2b4d67 UX: rename setting num_flags_to_block_new_user to num_spam_flags_to_block_new_user 2016-06-15 13:19:06 -04:00
a6090339a7 FEATURE: tag group options: limit usage of one tag per group, tags in a group can't be used unless a prerequisite tag is used 2016-06-09 16:01:19 -04:00
a49ace0ffb FEATURE: ability to restrict tags to categories using groups 2016-06-07 15:36:20 -04:00
deb93044b4 FEATURE: new tags can be created from the "edit category" modal when defining the set of permitted tags 2016-05-31 17:27:22 -04:00
6796b15857 FEATURE: restrict tags to be used in a category 2016-05-30 16:56:33 -04:00
a22abda594 Use 4.0 api for job fakes (as opposed to master) 2016-01-01 15:48:49 +11:00
426299d261 FEATURE: upgrade to Sidekiq 4 2016-01-01 15:40:31 +11:00
3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
b8cbe51026 Convert specs to RSpec 2.99.2 syntax with Transpec
This conversion is done by Transpec 3.1.0 with the following command:
    transpec

* 424 conversions
    from: obj.should
      to: expect(obj).to

* 325 conversions
    from: == expected
      to: eq(expected)

* 38 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 15 conversions
    from: =~ /pattern/
      to: match(/pattern/)

* 9 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 5 conversions
    from: lambda { }.should_not
      to: expect { }.not_to

* 4 conversions
    from: lambda { }.should
      to: expect { }.to

* 2 conversions
    from: -> { }.should
      to: expect { }.to

* 2 conversions
    from: -> { }.should_not
      to: expect { }.not_to

* 1 conversion
    from: === expected
      to: be === expected

* 1 conversion
    from: =~ [1, 2]
      to: match_array([1, 2])

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2015-04-25 11:18:35 -04:00
484ae8b6b7 FIX: return proper error message when replying to a closed or deleted topic 2015-03-16 16:43:22 +05:30
efc4109902 update specs to remove deprecation warnings 2014-11-07 06:05:44 -08:00
de76b512c1 fix most deprecations in the specs (still some left) 2014-09-25 17:44:48 +02:00
Sam
7a4082cbad FIX: allow API to create users when invite_only is true 2014-09-23 09:06:19 +10:00
Sam
59d04c0695 Internal renaming of elder,leader,regular,basic to numbers
Changed internals so trust levels are referred to with

TrustLevel[1], TrustLevel[2] etc.

This gives us much better flexibility naming trust levels, these names
are meant to be controlled by various communities.
2014-09-05 15:20:52 +10:00
fad0394a40 more renaming of trust level settings 2014-09-04 13:32:00 -07:00
c35af5d755 FIX: When re-opening a topic that auto-closed, make sure it won't auto-close again 2013-12-19 11:25:05 -05:00
9a24d2651d Allow category to auto-close topics in X hours instead of days. FIX: the system message that says a topic was automatically closed was only counting in days. 2013-12-06 16:39:35 -05:00
3c2c6ab24b Add sockpuppet spammer detection. Automatically flag posts if they are from new users (registered less than 24 hours ago) at the same IP address and one of them started the topic. 2013-10-11 13:34:05 -04:00
Sam
2ce4468aa5 rename system_username to site_contact_username , system_user is a special user with -1 id that is only used for certain admin tasks
for example system_user will autoclose stuff if needed, it will delete stubs and be the target for flag pms
2013-09-06 17:28:37 +10:00
Sam
58e7c3e1f3 push some work out of AR callbacks into PostCreator, add a couple of helpers for post and topic creation in test
fix it so the auto_track false marks topics as new
2013-07-22 15:07:20 +10:00
b7327942af Add deleted_by to Trashable tables 2013-07-09 15:46:36 -04:00
2c8ed8414c If an auto-closing topic is manually closed, remove the auto-close countdown 2013-07-03 16:54:41 -04:00