Rspec models Milestone, Commit, UsersProject
This commit is contained in:
parent
2095780f24
commit
e6c0673ef1
5 changed files with 157 additions and 1 deletions
|
@ -11,7 +11,7 @@ class Commit
|
|||
attr_accessor :commit, :head, :refs
|
||||
|
||||
delegate :message, :authored_date, :committed_date, :parents, :sha,
|
||||
:date, :committer, :author, :message, :diffs, :tree, :id,
|
||||
:date, :committer, :author, :diffs, :tree, :id,
|
||||
:to_patch, to: :commit
|
||||
|
||||
class << self
|
||||
|
|
|
@ -35,6 +35,10 @@ class UsersProject < ActiveRecord::Base
|
|||
|
||||
delegate :name, :email, to: :user, prefix: true
|
||||
|
||||
scope :guests, where(project_access: GUEST)
|
||||
scope :reporters, where(project_access: REPORTER)
|
||||
scope :developers, where(project_access: DEVELOPER)
|
||||
scope :masters, where(project_access: MASTER)
|
||||
scope :in_project, ->(project) { where(project_id: project.id) }
|
||||
|
||||
class << self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue