Commit graph

110 commits

Author SHA1 Message Date
shlok007
8839a928ed mending failing tests 2017-06-28 06:55:30 +05:30
shlok007
ad3d6f2f95 modify admin/conference_controller_spec and not authorized error messages 2017-06-28 06:55:30 +05:30
AEtherC0r3
a1124546f1 Fix rspec tests because of the changes to the cfp
Remove redundant association
Note: a conference created with :full_conference already has a cfp
2017-06-27 21:16:46 +03:00
Ana María Martínez Gómez
905f8954d0 Fix broken test in Admin::EventsController
We are using `paper_trail` gem, which saves data in database table
versions. It has a native way to search in the versions records,
using `where_object()` and `where_object_changes()`. They are broken,
under certain conditions. We changed them to a manual `where()`.

To test this case we need: an Event with ID 1, an Event with ID 2, and
a commercial with ID 1, for event with ID 2 - obviously the numbers
could be different as long as there is this matching of IDs. Before
this was made wit ha expect, which would make the test fail if this is
not the case. But this is actually the test case, not what we want to
test, so I moved to the `let`.

This was also the case why one of the test was broken after we change
how the database is cleaned in:

https://github.com/openSUSE/osem/pull/1541

I also remove the feature test, as this should be tested in a
controller test.
2017-06-26 15:35:05 +02:00
shlok007
6cf9ddbdea fix failing test 2017-06-12 19:43:44 +05:30
shlok007
521c05af61 skip failing tests 2017-06-12 19:43:44 +05:30
shlok007
3fb316482c suggested changes 2017-06-12 19:43:44 +05:30
shlok007
8edf896d86 introduce organizations 2017-06-12 19:43:44 +05:30
AEtherC0r3
dbf7b73d1a Test ConferenceRegistration#new behaviour
Create shared example for when the user can create a new registration
Change older tests to use the shared example
Add tests for confirmed speakers
2017-05-13 17:47:22 +03:00
Siddhant Bajaj
1c12200003 Fixed paper trail inconsistent results for numeric values
There is a known issue in paper_trail that whenever we Query the
'versions.object' column it evaluates inconsistent results for numeric
values due to limitations of SQL wildcard matchers against the
serialized objects. So to fix this issue I have manually formed the where
query instead of using where_object and where_object_changes. I have
also added test for the same.
Fixes #1307
2017-05-11 14:01:52 +03:00
Eugene Dubinin
93404d543f implement user creation by admin 2017-05-08 22:54:02 +03:00
Siddhant Bajaj
95d459f058 Added validation in EventSchedule model and test in event_schedule_spec
EventSchedule start time should be in hours range of the conference.Therefore it adds validation on start_time attribute of event schedule model. It also adds test for the same.
2017-04-22 01:20:05 +05:30
Eugene Dubinin
790e2fd3a2 implement manual event management and support for multiple speakers per event 2017-04-13 17:15:21 +03:00
Sunny
03fa299058 enable style/dotposition rubocop cop 2017-04-06 23:19:58 -04:00
AEtherC0r3
88e1646e87 Fix unreachable code (#1140) in ConferenceRegistrationController#new
Remove the unreachable code from ConferenceRegistrationController#new
Rework the  error message logic in ConferenceRegistrationController#new
Fix redirect to #edit when the user is registered
Refactor ConferenceRegistrationController#new spec and add more tests
2017-03-07 17:40:19 +02:00
richiethomas
daf1f805bd Rename 'ConferenceController' to 'ConferencesController', and 'ProposalController' to 'ProposalsController' 2016-09-30 18:49:44 -04:00
Hernan Schmidt
686e41c3d0 Fix proposal controller specs to work with MySQL 2016-08-18 18:32:41 +02:00
Hernán Schmidt
32019a11e1 Merge pull request #1108 from rishabhs95/stripe
Online payment feature - direct stripe integration
2016-08-18 16:04:11 +02:00
shlok007
c50e8c0466 Implemented ability of admins to manually confirm users 2016-08-16 02:23:41 -04:00
Stella Rouzi
86ba2d005e Merge pull request #1019 from nishanthvijayan/changelog
Changelog/Revision History page
2016-08-15 14:16:12 +03:00
Rishabh Saxena
a5bb038f61 modify tests for changed payment flow 2016-08-15 10:59:34 +05:30
Henne Vogelsang
2b4bf2fff7 Merge pull request #1138 from charliequinn/increase-tests-conference-registrations-controller
Specs added ConferenceRegistrationsController#new
2016-08-12 13:42:24 +02:00
Nishanth Vijayan
a45e537bac Setup basic Revision History page
Sets up paper_trail tracking in important models

and add conference_id to versions for storing conference_id
of conference related objects  as metadata.This will help in querying
for versions related to conferences.

Fix issues with factories & event types initialization.Import paper_trail testing helpers
Fix bug: Creating an event creates a useless version with event update

Add revert and view changes features to revision history
2016-08-12 13:35:56 +05:30
charliequinn
df8517b011 Specs added ConferenceRegistrationsController#new
- Increased test coverage with addition of specs to cover :new method of
  ConferenceRegistrationsController
2016-08-11 23:54:21 +01:00
Ana
1989a33da1 Test namings
Test namings in event_schedules and schedules controllers.
2016-08-11 15:11:27 +02:00
Ana
8975df6a6b Event schedules controller tests improved 2016-08-11 15:11:27 +02:00
Ana
a1c7f67735 Render errors in JSON in the schedule correctly 2016-08-11 15:11:27 +02:00
Ana
e8261d41bc Improve Error messages
- Improve error messages in event schedules, schedules and program controller.
- Two respond_to blocks in the update method of program controller.
2016-08-11 15:11:27 +02:00
Ana
c687c1072e Add event schedules and schedules controller specs 2016-08-11 15:11:27 +02:00
Ana
a578167cf5 Event model improvements
- Drop selected_event_schedule function
- Rename scheduled_room and scheduled_start_time to room and time as if there is no selected_schedule, the event is not scheduled.
2016-08-11 15:11:27 +02:00
Ana
71dab6b79c SchedulesController introduced
The actions #schedule and #events were moved from conference controller to the new controller
2016-08-11 15:11:27 +02:00
Ana
3897ec79ca Repeated sentence moved to a function
program.selected_schedule.event_schedules.order(start_time: :asc) was repeated several times and it has been moved to conference#selected_event_schedules
2016-08-11 15:11:27 +02:00
Ana
beb17165a2 Introduce an association for the selected_schedule
Association in Program fot the selected_schedule
2016-08-11 15:11:27 +02:00
Ana
0b26ed5c35 EventSchedule validations
event, schedule, room and start_time are mandatory in EventSchedule.
2016-08-11 15:11:27 +02:00
Ana
354e15a76d Public schedule adapted to the new relations
Public schedule and all events adapted to the new relations and models to allow having several schedules in the admin shcedule.
2016-08-11 15:11:27 +02:00
Arun Kumar
0675572e05
Modify conference registration to a singular resource 2016-07-05 01:15:32 +05:30
Stella Rouzi
15076b11f1 XML export fix tests. Add not nil room for scheduled events. 2016-06-20 21:05:08 +03:00
Stella Rouzi
8a595e6284 add test 2016-06-15 20:54:51 +03:00
Stella Rouzi
528243c8b9 Allow max_attendees to be nil 2016-05-15 14:01:36 +03:00
Henne Vogelsang
73ce49de25 Use dynamic fake data in the spec 2016-05-02 16:06:32 +02:00
Stella Rouzi
01ec43e53a Registration for Events 2016-04-26 16:11:40 +03:00
Aditya Prakash
35935fb726 Add devise confirmation controller test 2016-04-07 17:34:23 +05:30
Nishanth Vijayan
5587f1dc14 Add tests for api/v1/conferences_controller 2016-04-03 16:02:34 +05:30
Henne Vogelsang
c4e782a90c Merge pull request #931 from nishanthvijayan/fix-api-events-speakers
Fix api controllers events and speakers
2016-04-01 15:05:26 +02:00
Nishanth Vijayan
f8822b8745 Add tests for api/v1/events_controller and api/v1/speakers_controller 2016-03-31 17:22:12 +05:30
Aditya Prakash
f4678e5415 Add proposal controller tests 2016-03-30 22:26:52 +05:30
Aditya Prakash
19157ac81d Add test for conference registration controller show and destroy action
After failed delete, user should be redirected to registration show and not
root.
2016-03-23 11:42:40 +05:30
Henne Vogelsang
70d27b6a26 Merge pull request #898 from sonalkr132/edit-update-registration-test
Add test for conference registration controller edit and update action
2016-03-22 18:25:31 +01:00
Aditya Prakash
6a6824cef1 Add sponsership levels controller tests 2016-03-22 18:17:14 +05:30
Aditya Prakash
b41d2bd5c1 Add test for conference registration controller edit and update action 2016-03-22 17:13:15 +05:30