Compare commits

...

2 Commits

Author SHA1 Message Date
qyzh 0cd58a4e7a 整理测试代码 2021-10-29 09:10:36 +08:00
qyzh 859566e4be 整理测试代码 2021-10-29 09:09:47 +08:00
205 changed files with 3643 additions and 1768 deletions

4
.gitignore vendored
View File

@ -75,7 +75,7 @@ vendor/bundle/
/public/admin
/mysql_data
/public/repo/
/coverage
.generators
.rakeTasks
@ -86,4 +86,4 @@ redis_data/
Dockerfile
dump.rdb
.tags*
ceshi_user.xlsx
ceshi_user.xlsx

View File

@ -77,6 +77,7 @@ group :test do
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
gem 'simplecov', '~>0.12.0', require: false
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

View File

@ -107,6 +107,7 @@ GEM
activerecord (>= 3.1.0, < 7)
diff-lcs (1.3)
diffy (3.3.0)
docile (1.1.5)
e2mmap (0.1.0)
elasticsearch (7.5.0)
elasticsearch-api (= 7.5.0)
@ -150,6 +151,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.6.0)
jwt (2.2.1)
kaminari (1.2.0)
activesupport (>= 4.1.0)
@ -374,6 +376,11 @@ GEM
simple_xlsx_reader (1.0.4)
nokogiri
rubyzip
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sinatra (2.0.8.1)
mustermann (~> 1.0)
rack (~> 2.0)
@ -499,6 +506,7 @@ DEPENDENCIES
sidekiq-cron (~> 1.1)
simple_form
simple_xlsx_reader
simplecov (~> 0.12.0)
sinatra
solargraph (~> 0.38.0)
spreadsheet

View File

@ -264,10 +264,17 @@ class UsersController < ApplicationController
render_ok
end
def update_description
def update_sponsor_description
@user = User.find params[:id]
if @user.id == User.current.id && @user.update(description: params[:description])
render_ok
if @user.id == User.current.id
# @user.update(description: params[:description])
@user.sponsor_description = params[:sponsor_description]
puts "$$$$$$$$$$$$$$$$$$$$$=", @user.sponsor_description
if @user.save!
render_ok
else
render_error
end
else
render_error
end
@ -304,7 +311,7 @@ class UsersController < ApplicationController
:gender, :location, :location_city,
:occupation, :technical_title,
:school_id, :department_id, :province, :city,
:custom_department, :identity, :student_id, :description,
:custom_department, :identity, :student_id, :description, :sponsor_description,
:show_email, :show_location, :show_department]
)
end

View File

@ -48,7 +48,7 @@
# sponsor_certification :integer default("0")
# sponsor_num :integer default("0")
# sponsored_num :integer default("0")
# description :text(65535)
# sponsor_description :text(65535)
# devops_step :integer default("0")
# award_time :datetime
#

View File

@ -48,7 +48,7 @@
# sponsor_certification :integer default("0")
# sponsor_num :integer default("0")
# sponsored_num :integer default("0")
# description :text(65535)
# sponsor_description :text(65535)
# devops_step :integer default("0")
# award_time :datetime
#

View File

@ -48,7 +48,7 @@
# sponsor_certification :integer default("0")
# sponsor_num :integer default("0")
# sponsored_num :integer default("0")
# description :text(65535)
# sponsor_description :text(65535)
# devops_step :integer default("0")
# award_time :datetime
#

View File

@ -15,7 +15,7 @@ json.need_edit_info @user.need_edit_info?
# json.email @user.mail
json.profile_completed @user.profile_is_completed?
json.professional_certification @user.professional_certification
json.description @user.description
json.sponsor_description @user.sponsor_description
json.devops_step @user.devops_step
json.ci_certification @user.ci_certification?
json.email @user.mail

View File

@ -13,4 +13,5 @@ json.email @user.show_email ? @user.mail : nil
json.province @user.show_location ? @user.province : nil
json.city @user.show_location ? @user.city : nil
json.custom_department @user.show_department ? @user.custom_department : nil
json.description @user.description
json.description @user.description
json.sponsor_description @user.sponsor_description

View File

@ -226,7 +226,7 @@ Rails.application.routes.draw do
get :projects
get :watch_users
get :fan_users
put :update_description
put :update_sponsor_description
get :hovercard
end
collection do

View File

@ -0,0 +1,5 @@
class ChangeUserDescriptionToSponsorDescription < ActiveRecord::Migration[5.2]
def change
rename_column :users, :description, :sponsor_description
end
end

3431
out.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe AdminController, type: :controller do
end

View File

@ -1,47 +0,0 @@
require 'rails_helper'
RSpec.describe Admins::EduSettingsController, type: :controller do
describe "GET #index" do
it "returns http success" do
get :index
expect(response).to have_http_status(:success)
end
end
describe "GET #new" do
it "returns http success" do
get :new
expect(response).to have_http_status(:success)
end
end
describe "GET #update" do
it "returns http success" do
get :update
expect(response).to have_http_status(:success)
end
end
describe "GET #edit" do
it "returns http success" do
get :edit
expect(response).to have_http_status(:success)
end
end
describe "GET #create" do
it "returns http success" do
get :create
expect(response).to have_http_status(:success)
end
end
describe "GET #destroy" do
it "returns http success" do
get :destroy
expect(response).to have_http_status(:success)
end
end
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe BlobController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe BoardsController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CommentsController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseGroupsController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseModulesController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseSecondCategoriesController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseStagesController, type: :controller do
end

View File

@ -1,141 +0,0 @@
require 'rails_helper'
# This spec was generated by rspec-rails when you ran the scaffold generator.
# It demonstrates how one might use RSpec to specify the controller code that
# was generated by Rails when you ran the scaffold generator.
#
# It assumes that the implementation code is generated by the rails scaffold
# generator. If you are using any extension libraries to generate different
# controller code, this generated spec may or may not pass.
#
# It only uses APIs available in rails and/or rspec-rails. There are a number
# of tools you can use to make these specs even more expressive, but we're
# sticking to rails and rspec-rails APIs to keep things simple and stable.
#
# Compared to earlier versions of this generator, there is very limited use of
# stubs and message expectations in this spec. Stubs are only used when there
# is no simpler way to get a handle on the object needed for the example.
# Message expectations are only used when there is no simpler way to specify
# that an instance is receiving a specific message.
#
# Also compared to earlier versions of this generator, there are no longer any
# expectations of assigns and templates rendered. These features have been
# removed from Rails core in Rails 5, but can be added back in via the
# `rails-controller-testing` gem.
RSpec.describe CoursesController, type: :controller do
# This should return the minimal set of attributes required to create a valid
# Course. As you add validations to Course, be sure to
# adjust the attributes here as well.
let(:valid_attributes) {
skip("Add a hash of attributes valid for your model")
}
let(:invalid_attributes) {
skip("Add a hash of attributes invalid for your model")
}
# This should return the minimal set of values that should be in the session
# in order to pass any filters (e.g. authentication) defined in
# CoursesController. Be sure to keep this updated too.
let(:valid_session) { {} }
describe "GET #index" do
it "returns a success response" do
Course.create! valid_attributes
get :index, params: {}, session: valid_session
expect(response).to be_successful
end
end
describe "GET #show" do
it "returns a success response" do
course = Course.create! valid_attributes
get :show, params: {id: course.to_param}, session: valid_session
expect(response).to be_successful
end
end
describe "GET #new" do
it "returns a success response" do
get :new, params: {}, session: valid_session
expect(response).to be_successful
end
end
describe "GET #edit" do
it "returns a success response" do
course = Course.create! valid_attributes
get :edit, params: {id: course.to_param}, session: valid_session
expect(response).to be_successful
end
end
describe "POST #create" do
context "with valid params" do
it "creates a new Course" do
expect {
post :create, params: {course: valid_attributes}, session: valid_session
}.to change(Course, :count).by(1)
end
it "redirects to the created course" do
post :create, params: {course: valid_attributes}, session: valid_session
expect(response).to redirect_to(Course.last)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'new' template)" do
post :create, params: {course: invalid_attributes}, session: valid_session
expect(response).to be_successful
end
end
end
describe "PUT #update" do
context "with valid params" do
let(:new_attributes) {
skip("Add a hash of attributes valid for your model")
}
it "updates the requested course" do
course = Course.create! valid_attributes
put :update, params: {id: course.to_param, course: new_attributes}, session: valid_session
course.reload
skip("Add assertions for updated state")
end
it "redirects to the course" do
course = Course.create! valid_attributes
put :update, params: {id: course.to_param, course: valid_attributes}, session: valid_session
expect(response).to redirect_to(course)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'edit' template)" do
course = Course.create! valid_attributes
put :update, params: {id: course.to_param, course: invalid_attributes}, session: valid_session
expect(response).to be_successful
end
end
end
describe "DELETE #destroy" do
it "destroys the requested course" do
course = Course.create! valid_attributes
expect {
delete :destroy, params: {id: course.to_param}, session: valid_session
}.to change(Course, :count).by(-1)
end
it "redirects to the courses list" do
course = Course.create! valid_attributes
delete :destroy, params: {id: course.to_param}, session: valid_session
expect(response).to redirect_to(courses_url)
end
end
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe EduDatasController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe GraduationTasksController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe GraduationTopicsController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe GraduationWorksController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HackUserLastestCodesController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HacksController, type: :controller do
end

View File

@ -1,12 +0,0 @@
require 'rails_helper'
RSpec.describe HomeController, type: :controller do
describe "GET #index" do
it "returns http success" do
get :index
expect(response).to have_http_status(:success)
end
end
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkBanksController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkCommonsController, type: :controller do
end

View File

@ -1,141 +0,0 @@
require 'rails_helper'
# This spec was generated by rspec-rails when you ran the scaffold generator.
# It demonstrates how one might use RSpec to specify the controller code that
# was generated by Rails when you ran the scaffold generator.
#
# It assumes that the implementation code is generated by the rails scaffold
# generator. If you are using any extension libraries to generate different
# controller code, this generated spec may or may not pass.
#
# It only uses APIs available in rails and/or rspec-rails. There are a number
# of tools you can use to make these specs even more expressive, but we're
# sticking to rails and rspec-rails APIs to keep things simple and stable.
#
# Compared to earlier versions of this generator, there is very limited use of
# stubs and message expectations in this spec. Stubs are only used when there
# is no simpler way to get a handle on the object needed for the example.
# Message expectations are only used when there is no simpler way to specify
# that an instance is receiving a specific message.
#
# Also compared to earlier versions of this generator, there are no longer any
# expectations of assigns and templates rendered. These features have been
# removed from Rails core in Rails 5, but can be added back in via the
# `rails-controller-testing` gem.
RSpec.describe MemosController, type: :controller do
# This should return the minimal set of attributes required to create a valid
# Memo. As you add validations to Memo, be sure to
# adjust the attributes here as well.
let(:valid_attributes) {
skip("Add a hash of attributes valid for your model")
}
let(:invalid_attributes) {
skip("Add a hash of attributes invalid for your model")
}
# This should return the minimal set of values that should be in the session
# in order to pass any filters (e.g. authentication) defined in
# MemosController. Be sure to keep this updated too.
let(:valid_session) { {} }
describe "GET #index" do
it "returns a success response" do
Memo.create! valid_attributes
get :index, params: {}, session: valid_session
expect(response).to be_successful
end
end
describe "GET #show" do
it "returns a success response" do
memo = Memo.create! valid_attributes
get :show, params: {id: memo.to_param}, session: valid_session
expect(response).to be_successful
end
end
describe "GET #new" do
it "returns a success response" do
get :new, params: {}, session: valid_session
expect(response).to be_successful
end
end
describe "GET #edit" do
it "returns a success response" do
memo = Memo.create! valid_attributes
get :edit, params: {id: memo.to_param}, session: valid_session
expect(response).to be_successful
end
end
describe "POST #create" do
context "with valid params" do
it "creates a new Memo" do
expect {
post :create, params: {memo: valid_attributes}, session: valid_session
}.to change(Memo, :count).by(1)
end
it "redirects to the created memo" do
post :create, params: {memo: valid_attributes}, session: valid_session
expect(response).to redirect_to(Memo.last)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'new' template)" do
post :create, params: {memo: invalid_attributes}, session: valid_session
expect(response).to be_successful
end
end
end
describe "PUT #update" do
context "with valid params" do
let(:new_attributes) {
skip("Add a hash of attributes valid for your model")
}
it "updates the requested memo" do
memo = Memo.create! valid_attributes
put :update, params: {id: memo.to_param, memo: new_attributes}, session: valid_session
memo.reload
skip("Add assertions for updated state")
end
it "redirects to the memo" do
memo = Memo.create! valid_attributes
put :update, params: {id: memo.to_param, memo: valid_attributes}, session: valid_session
expect(response).to redirect_to(memo)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'edit' template)" do
memo = Memo.create! valid_attributes
put :update, params: {id: memo.to_param, memo: invalid_attributes}, session: valid_session
expect(response).to be_successful
end
end
end
describe "DELETE #destroy" do
it "destroys the requested memo" do
memo = Memo.create! valid_attributes
expect {
delete :destroy, params: {id: memo.to_param}, session: valid_session
}.to change(Memo, :count).by(-1)
end
it "redirects to the memos list" do
memo = Memo.create! valid_attributes
delete :destroy, params: {id: memo.to_param}, session: valid_session
expect(response).to redirect_to(memos_url)
end
end
end

View File

@ -1,26 +0,0 @@
require 'rails_helper'
RSpec.describe MessagesController, type: :controller do
describe "GET #index" do
it "returns http success" do
get :index
expect(response).to have_http_status(:success)
end
end
describe "GET #create" do
it "returns http success" do
get :create
expect(response).to have_http_status(:success)
end
end
describe "GET #show" do
it "returns http success" do
get :show
expect(response).to have_http_status(:success)
end
end
end

View File

@ -1,40 +0,0 @@
require 'rails_helper'
RSpec.describe ProtectedBranchesController, type: :controller do
describe "GET #index" do
it "returns http success" do
get :index
expect(response).to have_http_status(:success)
end
end
describe "GET #create" do
it "returns http success" do
get :create
expect(response).to have_http_status(:success)
end
end
describe "GET #edit" do
it "returns http success" do
get :edit
expect(response).to have_http_status(:success)
end
end
describe "GET #update" do
it "returns http success" do
get :update
expect(response).to have_http_status(:success)
end
end
describe "GET #destroy" do
it "returns http success" do
get :destroy
expect(response).to have_http_status(:success)
end
end
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe QuestionBanksController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe SchoolsController, type: :controller do
end

View File

@ -48,58 +48,121 @@ RSpec.describe SponsorshipsController, type: :controller do
# in order to pass any filters (e.g. authentication) defined in
# SponsorshipsController. Be sure to keep this updated too.
let(:valid_session) { {www_user_id: 5} }
let(:visitor_session) { {www_user_id: 4} }
describe "GET #index" do
it "returns a success response" do
describe 'GET #index' do
before {Sponsorship.create valid_attributes}
it 'success' do
Sponsorship.create! valid_attributes
get :index, params: {}, format: 'json', session: valid_session
expect(response.body).to eq('[]')
expect(response).to be_successful
end
end
describe "GET #stopped" do
it "returns a success response" do
describe 'GET #stopped' do
it 'returns a success response' do
sponsorship=StoppedSponsorship.create! valid_attributes
get :stopped, params: {}, format: 'json', session: valid_session
expect(response).to be_successful
end
end
describe "GET #show" do
it "returns a success response" do
describe 'GET #sponsored' do
context 'owner' do
it 'returns a success response' do
sponsorship=Sponsorship.create! valid_attributes
get :sponsored, params: {id: 5}, format: 'json', session: valid_session
expect(response).to be_successful
end
end
context 'visitor' do
it 'returns a success response' do
sponsorship=Sponsorship.create! valid_attributes
get :sponsored, params: {id: 5}, format: 'json', session: visitor_session
expect(response).to be_successful
end
end
end
describe 'GET #sponsoring' do
# before {Sponsorship.create! valid_attributes}
context 'owner' do
it 'returns a success response' do
# sponsorship=Sponsorship.create! valid_attributes
get :sponsoring, params: {id: 5}, format: 'json', session: valid_session
expect(response).to be_successful
end
end
context 'visitor' do
it 'returns a success response' do
# sponsorship=Sponsorship.create! valid_attributes
get :sponsoring, params: {id: 5}, format: 'json', session: visitor_session
expect(response).to be_successful
end
end
end
describe 'GET #stopped_sponsored' do
it 'returns a success response' do
sponsorship=Sponsorship.create! valid_attributes
get :stopped_sponsored, params: {id: 5}, format: 'json', session: valid_session
expect(response).to be_successful
end
end
describe 'GET #stopped_sponsoring' do
before {Sponsorship.create! valid_attributes}
it 'returns a success response' do
# sponsorship=Sponsorship.create! valid_attributes
get :stopped_sponsoring, params: {id: 5}, format: 'json', session: valid_session
expect(response).to be_successful
end
end
describe 'GET #show' do
it 'returns a success response' do
sponsorship = Sponsorship.create! valid_attributes
get :show, params: {id: sponsorship.to_param}, session: valid_session
expect(response).to be_successful
end
end
describe "POST #create" do
context "with valid params" do
it "creates a new Sponsorship" do
describe 'GET #community_data' do
it 'returns a success response' do
sponsorship = Sponsorship.create! valid_attributes
get :community_data, params: {}, session: valid_session
expect(response).to be_successful
end
end
describe 'POST #create' do
context 'with valid params' do
it 'creates a new Sponsorship' do
expect {
post :create, params: {sponsorship: valid_create_api_attributes}, session: valid_session
}.to change(Sponsorship, :count).by(1)
end
it "redirects to the created sponsorship" do
it 'redirects to the created sponsorship' do
post :create, params: {sponsorship: valid_create_api_attributes}, session: valid_session
expect(response).to be_ok
end
end
context "single sponsor" do
context 'single sponsor' do
let(:valid_single_params){
{amount: 10, visible: 1, developer_id: 1, single: true}
}
it "creates a stopped sponsorship" do
it 'creates a stopped sponsorship' do
expect {
post :create, params: {amount: 10, visible: 1, developer_id: 1, single: true}, session: valid_session
}.to change(StoppedSponsorship, :count).by(0)
end
end
context "repeat sponsor" do
it "creates only one new Sponsorship" do
context 'repeat sponsor' do
it 'creates only one new Sponsorship' do
Sponsorship.create! valid_attributes
expect {
post :create, params: {sponsorship: valid_create_api_attributes}, session: valid_session
@ -107,7 +170,7 @@ RSpec.describe SponsorshipsController, type: :controller do
end
end
context "with invalid params" do
context 'with invalid params' do
it "returns a success response (i.e. to display the 'new' template)" do
post :create, params: {sponsorship: invalid_attributes}, session: valid_session
expect(response).to be_successful
@ -115,13 +178,13 @@ RSpec.describe SponsorshipsController, type: :controller do
end
end
describe "PUT #update" do
context "with valid params" do
describe 'PUT #update' do
context 'with valid params' do
let(:new_attributes) {
{amount: 20, visible: 0}
}
it "updates the requested sponsorship" do
it 'updates the requested sponsorship' do
sponsorship = Sponsorship.create! valid_attributes
put :update, params: {id: sponsorship.to_param, sponsorship: new_attributes}, session: valid_session
sponsorship.reload
@ -129,7 +192,7 @@ RSpec.describe SponsorshipsController, type: :controller do
expect(sponsorship.visible).to eq(0)
end
it "does not updates the requested sponsorship with wrong user" do
it 'does not updates the requested sponsorship with wrong user' do
sponsorship = Sponsorship.create! invalid_user_attributes
put :update, params: {id: sponsorship.to_param, sponsorship: new_attributes}, session: valid_session
sponsorship.reload
@ -137,14 +200,14 @@ RSpec.describe SponsorshipsController, type: :controller do
expect(sponsorship.visible).to eq(1)
end
it "return ok" do
it 'return ok' do
sponsorship = Sponsorship.create! valid_attributes
put :update, params: {id: sponsorship.to_param, sponsorship: valid_attributes}, session: valid_session
expect(response).to be_ok
end
end
context "with invalid params" do
context 'with invalid params' do
it "returns a success response (i.e. to display the 'edit' template)" do
sponsorship = Sponsorship.create! valid_attributes
put :update, params: {id: sponsorship.to_param, sponsorship: invalid_attributes}, session: valid_session
@ -153,28 +216,28 @@ RSpec.describe SponsorshipsController, type: :controller do
end
end
describe "DELETE #destroy" do
it "destroys the requested sponsorship" do
describe 'DELETE #destroy' do
it 'destroys the requested sponsorship' do
sponsorship = Sponsorship.create! valid_attributes
expect {
delete :destroy, params: {id: sponsorship.to_param}, session: valid_session
}.to change(Sponsorship, :count).by(-1)
end
it "destroys the requested sponsorship" do
it 'destroys the requested sponsorship' do
sponsorship = Sponsorship.create! invalid_user_attributes
expect {
delete :destroy, params: {id: sponsorship.to_param}, session: valid_session
}.to change(Sponsorship, :count).by(0)
end
it "return ok" do
it 'return ok' do
sponsorship = Sponsorship.create! valid_attributes
delete :destroy, params: {id: sponsorship.to_param}, session: valid_session
expect(response).to be_ok
end
it "return ok" do
it 'return ok' do
sponsorship = Sponsorship.create! invalid_user_attributes
delete :destroy, params: {id: sponsorship.to_param}, session: valid_session
expect(response).to be_ok

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe StagesController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe StudentWorksController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe SubjectListsController, type: :controller do
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe TrustieHacksController, type: :controller do
end

View File

@ -2,11 +2,51 @@ require 'rails_helper'
RSpec.describe WalletsController, type: :controller do
describe "GET #balance" do
it "returns http success" do
get :balance
let(:valid_session) {
{user_id: 5, www_user_id: 5}
}
describe 'GET #balance' do
it 'returns http success' do
get :balance, params: {id: 5}, session: valid_session
expect(response).to have_http_status(:success)
end
end
describe 'GET #coin_changes' do
context 'all' do
it 'success' do
get :coin_changes, params: {id: 5, category: 'all'}, session: valid_session
expect(response).to have_http_status(:success)
end
end
context 'income' do
it 'success' do
get :coin_changes, params: {id: 5, category: 'income'}, session: valid_session
expect(response).to have_http_status(:success)
end
end
context 'outcome' do
it 'success' do
get :coin_changes, params: {id: 5, category: 'outcome'}, session: valid_session
expect(response).to have_http_status(:success)
end
end
end
describe 'GET #balance_chart' do
it 'returns http success' do
get :balance_chart, params: {id: 5}, session: valid_session
expect(response).to have_http_status(:success)
end
end
describe 'GET #community_data' do
it 'returns http success' do
get :community_data, params: {id: 5}, session: valid_session
expect(response).to have_http_status(:success)
end
end
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the ExerciseQuestionsHelper. For example:
#
# describe ExerciseQuestionsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe ExerciseQuestionsHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the ExportHelper. For example:
#
# describe ExportHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe ExportHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the HomeworkBanksHelper. For example:
#
# describe HomeworkBanksHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe HomeworkBanksHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the HomeworkCommonsHelper. For example:
#
# describe HomeworkCommonsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe HomeworkCommonsHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the PollsHelper. For example:
#
# describe PollsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe PollsHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the QuestionBanksHelper. For example:
#
# describe QuestionBanksHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe QuestionBanksHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the SchoolsHelper. For example:
#
# describe SchoolsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe SchoolsHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the StudentWorksHelper. For example:
#
# describe StudentWorksHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe StudentWorksHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,15 +0,0 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the SubjectListsHelper. For example:
#
# describe SubjectListsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe SubjectListsHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CreateStudentWorkJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CreateSubjectCourseStudentJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkAbsencePenaltyCalculationJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkAnonymousAppealStartNotifyJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkBatchCommentJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkEndUpdateScoreJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkEvaluationCommentAssginJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkEvaluationStartNotifyJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe HomeworkPublishUpdateWorkStatusJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe LivePublishJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe Board, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe Career, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ChallengeAnswer, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ChallengeSample, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ChallengeWorkScore, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CompetitionAward, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CompetitionCourseCourseRecord, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CompetitionCourseRecord, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CompetitionCourseShixunRecord, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CompetitionModeSetting, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CompetitionSchool, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CompetitionScore, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseActivity, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseGroup, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseHomeworkCategory, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseInfo, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseList, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseMember, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseMessage, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseModule, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseSecondCategory, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe Course, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseStageShixun, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseStage, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe CourseVideo, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe Discipline, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe EcCourse, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe EcCourseUser, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe EcMajorCourse, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe EcSchoolUser, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe EcYear, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ExaminationBank, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ExaminationIntelligentSetting, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ExaminationItemAnalysis, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ExaminationItemChoice, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ExaminationItem, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ExaminationTypeSetting, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe Exercise, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe ExerciseUserScore, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

Some files were not shown because too many files have changed in this diff Show More