Commit graph

34 commits

Author SHA1 Message Date
Sasi Olin
e85ecede4c Fix the test failures 2022-03-30 12:39:01 +02:00
Andrew Kvalheim
7e9ce60293 Partially revert "Skip some failing specs..."
This reverts the skipping of tests by commit b688d353ac in:

  - `spec/models/user_spec.rb`
  - `spec/controllers/admin/users_controller_spec.rb`
  - `spec/datatables/user_datatable_spec.rb`
2022-03-08 17:18:34 -08:00
Henne Vogelsang
85dae98a76
👋 update_attributes
You served us well...
2022-02-23 14:36:05 +01:00
Henne Vogelsang
0104671e01
Stop validating factories in specs
We do validate all of them in a before(:suite) already.
2021-08-18 14:03:14 +02:00
Henne Vogelsang
b688d353ac
Skip some failing specs... 2021-03-06 02:41:07 +01:00
Stella Rouzi
8cf9c15a46 Revert change of active user definition
Closes #2560

Active users are needed for selectize, and the active definition changed to show recent users in #2297

This reverts that change, and provides
* active scope (user not disabled)
* recent scope (for use in #2297 changes, ie user distribution)
2019-10-24 18:34:12 +03:00
cyrille
35ec178beb Create a factory for organizer
Refactor organizer user creation in tests

Fixes https://github.com/openSUSE/osem/issues/2398
2019-03-18 23:16:15 +01:00
Henne Vogelsang
bec13df131 Adopt more specs to the shoulda-matchers update 2019-02-19 20:50:09 +01:00
James Mason
516e53d9df Use chartkick globally
* Clean up legacy charting imports
* Update existing donut and line charts
* Create helpers for parsing out existing chart data
* Move chart partials to a more common path
2018-12-30 16:57:22 -08:00
James Mason
43bef689fc Rubocop autocorrections 2018-11-16 09:06:05 -08:00
James Mason
6d31dfeef4 Add frozen_string_literal magic comment
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
2018-05-09 06:54:26 -07:00
James Mason
98defe2d0f Use role caching for Rolify to avoid N+1 queries
Resolves #2018

See https://github.com/RolifyCommunity/rolify#cached-roles-to-avoid-n1-issue
2018-04-04 07:36:29 -07:00
Naman Gupta
ac8b187f1f Speaker is also able to see the proposal and able to modify it 2017-12-12 18:57:12 +02:00
nasia
6cb11ff2f3 Add Style/WordArray at rubocop.yml #1463 2017-06-06 13:53:05 +03:00
AEtherC0r3
fa56ff7f6d Add helper function for speaker selection
The line '@users = User.all.order(:name)' is replicated a lot of times
in EventsController and ProposalsController.
So, this commit removes it and adds a helper function
'speaker_selector_input' that generates the field where the @users
variable was used.
Also, it makes the query more specific.

Fix #1455

Other changes:
* Include the username in the drop down menu
* Add .active scope to User and corresponding tests
* Add :disabled trait to User factory
2017-05-20 18:27:07 +03:00
AEtherC0r3
95b88be061 Add tests for openid signup with every provider
The spec for omniauth doesn't test signup for every provider, and it
doesn't test if it has tests for all available providers
Also, we no longer use secrets

* Add model test to check if the omniauth providers have changed
* Test signup using every provider
* Replace secretswith environment variables
2017-05-06 10:37:58 +03:00
Alberto Miedes Garcés
9d4c02cdb0 Improve test coverage for User model
* Wrote specs for `User#attended_event?`
* Wrote specs for `User#registered_to_event?
2017-03-17 11:26:47 +01:00
Hernan Schmidt
baa5894c38 Don't use DBCleaner inside tests 2016-08-18 18:32:41 +02:00
Ana
e082e7599d biography test fixed 2016-04-27 00:27:44 +02:00
Ana
5c044a801d Word limit on user biography 2016-04-27 00:27:44 +02:00
Stella Rouzi
01ec43e53a Registration for Events 2016-04-26 16:11:40 +03:00
Aditya Prakash
3bb220d3a9 Add test for user model
bang(!) was removed cause it was not needed and slowing single
test runs
2016-04-17 15:15:33 +05:30
Henne Vogelsang
cb9cf0359b Merge pull request #854 from sonalkr132/test-user-admin
Enforce non-admin attribute of user factory
2016-03-14 15:19:05 +01:00
Aditya Prakash
0619eb7963 Enforce non-admin attribute of user factory
Change in other specs to match the new factory setup.
2016-03-14 17:29:33 +05:30
Ana
8ae7155218 #name test added 2016-03-13 01:37:11 +01:00
Stella
ccd7ecbb90 Roles into their own controller. Rework interface. Add flash messages to ajax calls. Add description to roles. Possible to edit roles in use. 2016-03-01 17:10:45 +02:00
Stella
3adec92431 add user in tests, it is used for ichain testing 2014-11-12 18:31:42 +02:00
Stella Rouzi
08c7e6a79a tests for admin attribute assignment only to 2nd user, if 1rst is the deleted user. 2014-11-12 16:22:53 +02:00
chrisbr
085629958e Test for ichain authentication 2014-11-12 11:45:17 +01:00
Stella Rouzi
7ebfbae7ab fix test 2014-08-15 20:45:29 +03:00
Stella Rouzi
71dfb3b7e4 fix conflicts 2014-08-13 22:53:13 +03:00
Stella Rouzi
e2fb434dc7 Implement role authorization 2014-08-13 22:53:13 +03:00
Chrisbr
3dfb73d619 Removed shebang & encoding 2014-05-12 20:02:38 +02:00
Chrisbr
bbd9fd74d5 Implements user model tests 2014-05-10 15:57:38 +02:00